Documentation ¶
Index ¶
- func ArrayBackend(handlers ...HandleFunc) fullstate.Callback
- func Run(handler HandleFunc, extraBindFlags ...func(*pflag.FlagSet))
- func RunCh(backend fullstate.Callback, extraBindFlags ...func(*pflag.FlagSet))
- type FlagSet
- type HandleChFunc
- type HandleFunc
- type LocalClient
- func (lc *LocalClient) Cancel()
- func (lc *LocalClient) CancelOn(signals ...os.Signal)
- func (lc *LocalClient) CancelOnSignals()
- func (lc *LocalClient) Context() context.Context
- func (lc *LocalClient) DefaultFlags(flags FlagSet)
- func (lc *LocalClient) Dial() (conn *grpc.ClientConn, err error)
- func (lc *LocalClient) DialContext(ctx context.Context) (conn *grpc.ClientConn, err error)
- func (lc *LocalClient) Next() (canceled bool)
- type Runner
- type ServiceEndpoints
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayBackend ¶
func ArrayBackend(handlers ...HandleFunc) fullstate.Callback
ArrayBackend creates a Callback from the given array handlers
func Run ¶
func Run(handler HandleFunc, extraBindFlags ...func(*pflag.FlagSet))
Types ¶
type HandleChFunc ¶
type HandleFunc ¶
type HandleFunc func(items []*ServiceEndpoints)
type LocalClient ¶
type LocalClient struct { // Target is the gRPC dial target Target string TLS *tlsflags.Flags // ErrorDelay is the delay before retrying after an error. ErrorDelay time.Duration // GRPCBuffer is the max size of a gRPC message MaxMsgSize int Sink localsink.Sink // contains filtered or unexported fields }
LocalClient is a simple client to kube-proxy's Endpoints API.
func New ¶
func New(flags FlagSet) (lc *LocalClient)
New returns a new LocalClient with values bound to the given flag-set for command-line tools. Other needs can use `&LocalClient{...}` directly.
func (*LocalClient) Cancel ¶
func (lc *LocalClient) Cancel()
Cancel will cancel this client, quickly closing any call to Next.
func (*LocalClient) CancelOn ¶
func (lc *LocalClient) CancelOn(signals ...os.Signal)
CancelOn make the given signals to cancel this client.
func (*LocalClient) CancelOnSignals ¶
func (lc *LocalClient) CancelOnSignals()
CancelOnSignals make the default termination signals to cancel this client.
func (*LocalClient) Context ¶
func (lc *LocalClient) Context() context.Context
func (*LocalClient) DefaultFlags ¶
func (lc *LocalClient) DefaultFlags(flags FlagSet)
DefaultFlags registers this client's values to the standard flags.
func (*LocalClient) Dial ¶
func (lc *LocalClient) Dial() (conn *grpc.ClientConn, err error)
func (*LocalClient) DialContext ¶
func (lc *LocalClient) DialContext(ctx context.Context) (conn *grpc.ClientConn, err error)
func (*LocalClient) Next ¶
func (lc *LocalClient) Next() (canceled bool)
Next sends the next diff to the sink, waiting for a new revision as needed. It's designed to never fail, unless canceled.
type Runner ¶
type Runner struct { NodeName string // contains filtered or unexported fields }
func (*Runner) RunBackend ¶
RunBackend runs the client with the standard options, using the channeled backend. It should consume less memory as the dataset is processed as it's read instead of buffered.
type ServiceEndpoints ¶
type ServiceEndpoints = fullstate.ServiceEndpoints