state

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNNING  string = "RUNNING"
	FINISHED string = "FINISHED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SharedMutable

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

func New

func New(cluster string) *SharedMutable

New() instantiates a SharedMutable state and opens the goroutine listening for setObjects requests. Admiral assumes this is a singleton.

func (*SharedMutable) Cluster

func (s *SharedMutable) Cluster() string

Cluster returns the name of the cluster

func (*SharedMutable) Delete

func (s *SharedMutable) Delete(k string)

Delete sends a key to the deletion channel where run() removes it from the state.

func (*SharedMutable) Error

func (s *SharedMutable) Error(e error)

Error sends an error to the error channel.

func (*SharedMutable) Get

func (s *SharedMutable) Get(k string) (val string)

Get returns a value for the given key.

func (*SharedMutable) GetKubeClient

func (s *SharedMutable) GetKubeClient() kubernetes.Interface

GetKubeClient retrieves the Kubernetes client.

func (*SharedMutable) InitTimestamp

func (s *SharedMutable) InitTimestamp() time.Time

InitTimestamp returns the timestamp of when the SharedMutable state was created.

func (*SharedMutable) Set

func (s *SharedMutable) Set(k string, v string)

Set takes a key/value and sends it to the objects channel where run() adds it to the state.

func (*SharedMutable) SetErrChannel

func (s *SharedMutable) SetErrChannel(errChannel chan error)

SetErrChannel sets a shared error channel.

func (*SharedMutable) SetKubeClient

func (s *SharedMutable) SetKubeClient(client kubernetes.Interface)

SetKubeClient sets the Kubernetes client.

Jump to

Keyboard shortcuts

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