client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client holds the current state and configuration for a backend

func NewClient

func NewClient(name string, vip, dataIP net.IP, readTimeout, writeTimeout, healthRate int, sockaddr string) *Client

NewClient creates a new Client object

func (*Client) Deregister

func (c *Client) Deregister(req *string, reply *string) error

Deregister command from caplancectl

func (*Client) GetState

func (c *Client) GetState(req *string, reply *string) error

GetState command from caplancectl

func (*Client) Pause

func (c *Client) Pause(req *string, reply *string) error

Pause command from caplancectl

func (*Client) Resume

func (c *Client) Resume(req *string, reply *string) error

Resume command from caplancectl

func (*Client) Start

func (c *Client) Start(connectIP net.IP) error

Start attempts to register and listen for connections

type HealthState

type HealthState int

HealthState represents the current state of the client

const (
	// Unregistered represents the client state before registration
	Unregistered HealthState = 0
	// Registering represents state during registration
	Registering HealthState = 1
	// Active represents state when packets are being forwarded to the client
	Active HealthState = 2
	// Paused represents state when client is registered but packets are not being forwarded
	Paused HealthState = 3
	// Deregistering represents state when client is deregistering
	Deregistering HealthState = 4
)

Jump to

Keyboard shortcuts

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