client

package
v0.0.0-...-7b34d14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKDSSink

func NewKDSSink(log logr.Logger, clusterName string, rt []model.ResourceType, factory ClientFactory, cb *Callbacks) component.Component

Types

type Callbacks

type Callbacks struct {
	OnResourcesReceived func(clusterID string, rs model.ResourceList) error
}

type ClientFactory

type ClientFactory func() (KDSClient, error)

type KDSClient

type KDSClient interface {
	StartStream(clientId string) (KDSStream, error)
	Close() error
}

func New

func New(serverURL string, config *kds_config.KdsClientConfig) (KDSClient, error)

type KDSStream

type KDSStream interface {
	DiscoveryRequest(resourceType model.ResourceType) error
	Receive() (string, model.ResourceList, error)
	ACK(typ string) error
	NACK(typ string, err error) error
	Close() error
}

Jump to

Keyboard shortcuts

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