agent

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 10 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)
	Get() T
}

type ServerOption

type ServerOption struct {
	GardenerCache Cache[*v1beta1.ShootList]
	Logger        *logrus.Entry
}

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