agent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Address = "/tmp/cloudagent/cloudagent.sock"
	Network = "unix"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(opts *ServerOption) cloud_agent.AgentServer

func NewSocket

func NewSocket(network, address string) (net.Listener, error)

Types

type Cache

type Cache[T any] interface {
	Register(name string) RegisteredResource[T]
	Resources() map[string]RegisteredResource[T]
	Clean()
}

func NewCache

func NewCache[T any]() Cache[T]

type RegisteredResource

type RegisteredResource[T any] interface {
	Set(T, error)
	Get() Value[T]
}

type ResourceGetter added in v0.8.0

type ResourceGetter interface {
	GetGardenerCache() Cache[*v1beta1.ShootList]
	GetGeneralError() error
}

type ServerCache added in v0.5.0

type ServerCache struct {
	GardenerCache Cache[*v1beta1.ShootList]
	GeneralError  error
}

func (*ServerCache) GetGardenerCache added in v0.8.0

func (sc *ServerCache) GetGardenerCache() Cache[*v1beta1.ShootList]

func (*ServerCache) GetGeneralError added in v0.8.0

func (sc *ServerCache) GetGeneralError() error

type ServerOption

type ServerOption struct {
	ResourceGetter ResourceGetter
	Logger         *logrus.Entry
}

type Value added in v0.5.0

type Value[T any] struct {
	Error error
	Time  time.Time
	Value T
}

type WatchFn

type WatchFn func(context.Context)

type Watcher added in v0.4.0

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

func NewWatcher

func NewWatcher(opts WatcherOptions, fn ...WatchFn) (*Watcher, error)

func (*Watcher) Start added in v0.4.0

func (w *Watcher) Start()

func (*Watcher) Stop added in v0.4.0

func (w *Watcher) Stop() context.Context

type WatcherOptions

type WatcherOptions struct {
	Spec    string
	Context context.Context
	Logger  *logrus.Entry
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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