Documentation ¶
Index ¶
Constants ¶
View Source
const ( A6RoutesConf = 0 A6UpstreamsConf = 1 A6ServicesConf = 2 )
Variables ¶
This section is empty.
Functions ¶
func ServiceFilter ¶
func ServiceReplace ¶
func ServiceUpdate ¶
Types ¶
type A6Conf ¶
type A6Conf interface { GetAll() *map[string]interface{} Inject(nodes interface{}) Marshal() ([]byte, error) GetUpstream() Upstream HasNodesAttr() bool }
func NewServices ¶
func NewUpstreams ¶
type Message ¶
type Message struct { Key string Value string Version int64 Action StoreEvent // contains filtered or unexported fields }
func NewMessage ¶
func (*Message) DiscoveryArgs ¶
func (*Message) DiscoveryType ¶
func (*Message) HasNodesAttr ¶
func (*Message) InjectNodes ¶
func (msg *Message) InjectNodes(nodes interface{})
func (*Message) ServiceName ¶
type Routes ¶
type Routes struct { Upstream Upstream `json:"upstream"` All map[string]interface{} `json:"-"` // contains filtered or unexported fields }
func (*Routes) GetUpstream ¶
func (*Routes) HasNodesAttr ¶
type Services ¶
type Services struct { Upstream Upstream `json:"upstream"` All map[string]interface{} `json:"-"` // contains filtered or unexported fields }
func (*Services) GetUpstream ¶
func (*Services) HasNodesAttr ¶
type StoreEvent ¶
type StoreEvent = int
const ( // add or update config EventAdd StoreEvent = 0x01 // delete config EventDelete StoreEvent = 0102 )
type Upstream ¶
type Upstream struct { Nodes interface{} `json:"nodes,omitempty"` DiscoveryType string `json:"discovery_type,omitempty"` DupDiscoveryType string `json:"_discovery_type,omitempty"` DiscoveryArgs *UpstreamArg `json:"discovery_args,omitempty"` DupServiceName string `json:"_service_name,omitempty"` ServiceName string `json:"service_name,omitempty"` }
type UpstreamArg ¶
type Upstreams ¶
type Upstreams struct { Upstream All map[string]interface{} `json:"-"` // contains filtered or unexported fields }
func (*Upstreams) GetUpstream ¶
func (*Upstreams) HasNodesAttr ¶
Click to show internal directories.
Click to hide internal directories.