sets

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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()

	// ID returns the dispatcher set ID
	ID() int

	// Hosts returns the set addresses of the members of the dispatcher set
	Hosts() []string

	// Export dumps the dispatcher set
	Export() string

	// Update causes the dispatcher set to be updated
	Update(context.Context) (changed bool, err error)

	// Validate checks an address for membership in the set
	Validate(a string) bool

	// Watch waits for the dispatcher set to change, returning the new value when that change occurs.
	Watch(context.Context) (string, error)
}

DispatcherSet defines an individual dispatcher set

func NewKubernetesSet

func NewKubernetesSet(ctx context.Context, kc *k8s.Client, id int, namespace, name, port string) (DispatcherSet, error)

NewKubernetesSet returns a new kubernetes-based dispatcher set.

  • `id` 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 number of the SIP endpoints this set describes. This is optional, and if not specified, will default to "5060".

func NewStaticSet

func NewStaticSet(id int, members []string) DispatcherSet

NewStaticSet returns a new statically-defined dispatcher set

Jump to

Keyboard shortcuts

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