Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTagRouter ¶
NewTagRouter returns a tagRouter instance if url is not nil
func NewTagRouterFactory ¶
func NewTagRouterFactory() router.PriorityRouterFactory
NewTagRouterFactory create a tagRouterFactory
Types ¶
type FileTagRouter ¶
type FileTagRouter struct {
// contains filtered or unexported fields
}
FileTagRouter Use for parse config file of Tag router
func NewFileTagRouter ¶
func NewFileTagRouter(content []byte) (*FileTagRouter, error)
NewFileTagRouter Create file tag router instance with content (from config file)
func (*FileTagRouter) Priority ¶
func (f *FileTagRouter) Priority() int64
Priority Return Priority in listenable router
func (*FileTagRouter) URL ¶
func (f *FileTagRouter) URL() *common.URL
URL Return URL in file tag router n
type RouterRule ¶
type RouterRule struct { router.BaseRouterRule `yaml:",inline"` Tags []Tag AddressToTagNames map[string][]string TagNameToAddresses map[string][]string }
*
- %YAML1.2
- ---
- force: true
- runtime: false
- enabled: true
- priority: 1
- key: demo-provider
- tags:
- - name: tag1
- addresses: [ip1, ip2]
- - name: tag2
- addresses: [ip3, ip4]
- ...
RouterRule RouterRule config read from config file or config center
Click to show internal directories.
Click to hide internal directories.