leafcontroller

package
v0.0.0-...-5243f2d Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscoverSubject       = "_SAT.discover"
	StatusSubject         = "_SAT.%s.status"
	ConfigGetSubject      = "_SAT.%s.config.get"
	ConfigUpdateSubject   = "_SAT.%s.config.put"
	DefaultQueueGroupName = "controllers"
)
View Source
const Version = "0.1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller manages NATS Leaf node clusters running in Kubernetes.

func NewController

func NewController(opts *Options) *Controller

NewController creats a new Controller.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

Run starts the controller.

func (*Controller) SetupSignalHandler

func (c *Controller) SetupSignalHandler(ctx context.Context)

SetupSignalHandler enables handling process signals.

func (*Controller) Shutdown

func (c *Controller) Shutdown()

Shutdown stops the operator controller.

type Options

type Options struct {
	// ClusterName is the NATS cluster name.
	ClusterName string

	// NoSignals marks whether to enable the signal handler.
	NoSignals bool

	// NatsServerURL is the address of the ground NATS Server.
	NatsServerURL string

	// LeafRemoteCredentials are the auth keys for the NATS Leaf Server.
	NatsCredentials string

	// ConfigMapName is the config for this NATS Cluster that will be managed.
	ConfigMapName string

	// PodNamespace is the namespace where this controller is running.
	PodNamespace string
}

Options are the options for the controller.

Jump to

Keyboard shortcuts

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