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.
Click to show internal directories.
Click to hide internal directories.