k8s

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelPrefix      = "cluster.proto.actor/"
	LabelPort        = LabelPrefix + "port"
	LabelKind        = LabelPrefix + "kind"
	LabelCluster     = LabelPrefix + "cluster"
	LabelStatusValue = LabelPrefix + "status-value"
	LabelMemberID    = LabelPrefix + "member-id"
)

Label keys that will be used to update the Pods metadata

Variables

View Source
var ProviderShuttingDownError = fmt.Errorf("kubernetes cluster provider is being shut down")

Functions

This section is empty.

Types

type DeregisterMember

type DeregisterMember struct{}

DeregisterMember Empty struct used to deregister a member from k8s

type DeregisterMemberResponse

type DeregisterMemberResponse struct{}

DeregisterMemberResponse sent back from cluster monitor when deregistering completes or fails

type Labels

type Labels map[string]string

Convenience type to store cluster labels

type Option

type Option func(p *Provider)

Convenience type to refer to Option callables

type Provider

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

This data structure provides of k8s as cluster provider for Proto.Actor

func New

func New(opts ...Option) (*Provider, error)

New crates a new k8s Provider in the heap and return back a reference to its memory address

func NewWithConfig

func NewWithConfig(config *rest.Config, opts ...Option) (*Provider, error)

NewWithConfig creates a new k8s Provider in the heap using the given configuration and options, it returns a reference to its memory address or an error

func (*Provider) Shutdown

func (p *Provider) Shutdown(graceful bool) error

func (*Provider) StartClient

func (p *Provider) StartClient(c *cluster.Cluster) error

StartClient starts the k8s client and monitor watch

func (*Provider) StartMember

func (p *Provider) StartMember(c *cluster.Cluster) error

StartMember registers the member in the cluster and start it

type RegisterMember

type RegisterMember struct{}

RegisterMember message used to register a new member in k8s

type StartWatchingCluster

type StartWatchingCluster struct {
	ClusterName string
}

StartWatchingCluster message used to start watching a k8s cluster

type StopWatchingCluster

type StopWatchingCluster struct{}

StopWatchingCluster message used to stop watching a k8s cluster

type StopWatchingClusterResponse

type StopWatchingClusterResponse struct{}

StopWatchingClusterResponse sent back from cluster monitor when stop watching completes

Jump to

Keyboard shortcuts

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