router

package
v0.0.0-...-608e6a2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RegistryConfig registry.Config   `yaml:"registry_config" json:"registry_config"`
	Components     component.Configs `yaml:"components" json:"components"`
}

func (*Config) ParseFlagsWithPrefix

func (cfg *Config) ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)

ParseFlagsWithPrefix adds the flags required to config this to the given FlagSet.

type Router

type Router interface {
	lifecycle.LifeCycle

	clients.Caller

	Register(s *registry.ServiceNode) error
	Deregister(s *registry.ServiceNode) error
	Watch(s *registry.WatchService) error

	GetServiceNode(s *service.Service, keys ...string) (*node.Node, bool)
}

func NewRouter

func NewRouter(cfg Config) (Router, error)

Jump to

Keyboard shortcuts

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