Documentation ¶
Index ¶
- type DispatcherSet
- func NewKubernetesSet(ctx context.Context, f informers.SharedInformerFactory, setID int, ...) (DispatcherSet, error)
- func NewLegacyKubernetesSet(ctx context.Context, f informers.SharedInformerFactory, setID int, ...) (DispatcherSet, error)
- func NewStaticSet(id int, endpoints []*Endpoint) DispatcherSet
- type Endpoint
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DispatcherSet ¶
type DispatcherSet interface { // Close shuts down the dispatcher set Close() // State returns the current state of the DispatcherSet State() *State // IsMember checks an address for membership in the set IsMember(address string, port uint32) bool // RegisterChangeFunc registers a callback function which will be invoked whenever the DispatcherSet contents changes. RegisterChangeFunc(func(*State)) }
DispatcherSet defines an individual dispatcher set
func NewKubernetesSet ¶
func NewKubernetesSet(ctx context.Context, f informers.SharedInformerFactory, setID int, namespace, name, port string) (DispatcherSet, error)
NewKubernetesSet returns a new kubernetes-based dispatcher set.
`setID` is the dispatcher set's id
`namespace` is the namespace of the Service whose endpoints will describe this dispatcher set.
`name` is the name of the Service whose endpoints will describe this dispatcher set.
`port` is the port reference of the SIP endpoints this set describes. This is optional, and if not specified, will default to "5060".
func NewLegacyKubernetesSet ¶ added in v2.1.0
func NewLegacyKubernetesSet(ctx context.Context, f informers.SharedInformerFactory, setID int, namespace, name, port string) (DispatcherSet, error)
NewLegacyKunbernetesSet returns a new Kubernetes-based dispatcher set using the older Endpoints method. If the server is running an older version of Kubernetes which does not support v1.EndpointSlices (<v1.21), use this Kubernetes set.
`setID` is the dispatcher set's id
`namespace` is the namespace of the Service whose endpoints will describe this dispatcher set.
`name` is the name of the Service whose endpoints will describe this dispatcher set.
`port` is the port reference of the SIP endpoints this set describes. This is optional, and if not specified, will default to "5060".
func NewStaticSet ¶
func NewStaticSet(id int, endpoints []*Endpoint) DispatcherSet
NewStaticSet returns a new statically-defined dispatcher set