Documentation ¶
Index ¶
- Variables
- func Validate(data []byte) E.NestedError
- type DockerProvider
- type EventResult
- type FileProvider
- type Provider
- func (p *Provider) GetName() string
- func (p *Provider) GetRoute(alias string) (R.Route, bool)
- func (p *Provider) GetType() ProviderType
- func (p *Provider) IsExplicitOnly() bool
- func (p *Provider) LoadRoutes() E.NestedError
- func (p *Provider) MarshalText() ([]byte, error)
- func (p *Provider) RangeRoutes(do func(string, R.Route))
- func (p *Provider) StartAllRoutes() (res E.NestedError)
- func (p *Provider) Statistics() ProviderStats
- func (p *Provider) StopAllRoutes() (res E.NestedError)
- type ProviderImpl
- type ProviderStats
- type ProviderType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AliasRefRegex = regexp.MustCompile(`#\d+`) AliasRefRegexOld = regexp.MustCompile(`\$\d+`) )
Functions ¶
func Validate ¶
func Validate(data []byte) E.NestedError
Types ¶
type DockerProvider ¶
type DockerProvider struct { ExplicitOnly bool // contains filtered or unexported fields }
func (*DockerProvider) LoadRoutesImpl ¶
func (p *DockerProvider) LoadRoutesImpl() (routes R.Routes, err E.NestedError)
func (*DockerProvider) NewWatcher ¶
func (p *DockerProvider) NewWatcher() W.Watcher
func (*DockerProvider) OnEvent ¶
func (p *DockerProvider) OnEvent(event W.Event, routes R.Routes) (res EventResult)
func (*DockerProvider) String ¶
func (p *DockerProvider) String() string
type EventResult ¶
type EventResult struct {
// contains filtered or unexported fields
}
type FileProvider ¶
type FileProvider struct {
// contains filtered or unexported fields
}
func (*FileProvider) LoadRoutesImpl ¶
func (p *FileProvider) LoadRoutesImpl() (routes R.Routes, res E.NestedError)
func (*FileProvider) NewWatcher ¶
func (p *FileProvider) NewWatcher() W.Watcher
func (FileProvider) OnEvent ¶
func (p FileProvider) OnEvent(event W.Event, routes R.Routes) (res EventResult)
func (FileProvider) String ¶
func (p FileProvider) String() string
type Provider ¶
type Provider struct { ProviderImpl `json:"-"` // contains filtered or unexported fields }
func NewDockerProvider ¶
func NewDockerProvider(name string, dockerHost string) (p *Provider, err E.NestedError)
func NewFileProvider ¶
func NewFileProvider(filename string) (p *Provider, err E.NestedError)
func (*Provider) GetType ¶
func (p *Provider) GetType() ProviderType
func (*Provider) IsExplicitOnly ¶
func (*Provider) LoadRoutes ¶
func (p *Provider) LoadRoutes() E.NestedError
func (*Provider) MarshalText ¶
to work with json marshaller.
func (*Provider) StartAllRoutes ¶
func (p *Provider) StartAllRoutes() (res E.NestedError)
func (*Provider) Statistics ¶
func (p *Provider) Statistics() ProviderStats
func (*Provider) StopAllRoutes ¶
func (p *Provider) StopAllRoutes() (res E.NestedError)
type ProviderImpl ¶
type ProviderImpl interface { NewWatcher() W.Watcher // even returns error, routes must be non-nil LoadRoutesImpl() (R.Routes, E.NestedError) OnEvent(event W.Event, routes R.Routes) EventResult String() string }
func DockerProviderImpl ¶
func DockerProviderImpl(name, dockerHost string, explicitOnly bool) (ProviderImpl, E.NestedError)
func FileProviderImpl ¶
func FileProviderImpl(filename string) (ProviderImpl, E.NestedError)
type ProviderStats ¶
type ProviderStats struct { NumRPs int `json:"num_reverse_proxies"` NumStreams int `json:"num_streams"` Type ProviderType `json:"type"` }
type ProviderType ¶
type ProviderType string
const ( ProviderTypeDocker ProviderType = "docker" ProviderTypeFile ProviderType = "file" )
Click to show internal directories.
Click to hide internal directories.