Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback interface { UpdateEndpoints(endpoints ...*config.Endpoint) //when watch occurred error,will exec this method Error(error) }
Callback
type CallbackUpdate ¶
type CallbackUpdate interface { //TODO: //weight automatic discovery change implementation temporarily not ready UpdateEndpoints(operation config.Operation, endpoints ...*config.Endpoint) //when watch occurred error,will exec this method Error(error) }
CallbackUpdate
type Discover ¶
type Discover interface { // Add project to cache if not exists, then watch the endpoints. AddProject(name string, callback Callback) // Update a project. AddUpdateProject(name string, callback CallbackUpdate) Stop() }
Discover
func NewK8sDiscover ¶
NewK8sDiscover creates a new Discover
type KeepAlive ¶
type KeepAlive struct { EtcdClientArgs *etcdutil.ClientArgs ServerName string HostName string Endpoint string TTL int64 LID clientv3.LeaseID Done chan struct{} // contains filtered or unexported fields }
KeepAlive
func CreateKeepAlive ¶
func CreateKeepAlive(etcdClientArgs *etcdutil.ClientArgs, ServerName string, Protocol string, HostIP string, Port int) (*KeepAlive, error)
CreateKeepAlive create keepalive for server
Click to show internal directories.
Click to hide internal directories.