routing

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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