routing

package
v0.1.0-dev.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package routing provides a ChangeProvider that dispatches URIs to downstream change providers based on the URI's change type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(params Params) (changeprovider.ChangeProvider, error)

NewProvider creates a ChangeProvider that routes URIs to the appropriate downstream provider based on the URI's change type. Returns an error if all providers are nil.

Types

type Params

type Params struct {
	// GitHub handles URIs that parse as GitHub change IDs.
	GitHub changeprovider.ChangeProvider
	// Phabricator handles URIs that parse as Phabricator change IDs.
	Phabricator changeprovider.ChangeProvider
	// Git handles URIs that parse as git change IDs.
	Git changeprovider.ChangeProvider
}

Params holds the optional downstream providers, keyed by change type. At least one must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL