Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Version is the version of the NATS Streaming Operator. Version = "0.4.0" // DefaultNATSStreamingImage is the default image // of NATS Streaming that will be used, meant to be // the latest release available. DefaultNATSStreamingImage = "nats-streaming:0.18.0" // DefaultNATSStreamingClusterSize is the default size // for the cluster. Clustering is done via Raft so // an odd number of pods is recommended. DefaultNATSStreamingClusterSize = 3 // ResyncPeriod is how often the operator will be checking the resources. ResyncPeriod = 5 * time.Second // MonitoringPort is the port for the server monitoring endpoint. MonitoringPort = 8222 )
Variables ¶
This section is empty.
Functions ¶
func NewInformer ¶ added in v0.2.0
func NewInformer( c *Controller, resourceFuncs k8scache.ResourceEventHandlerFuncs, interval time.Duration, ) (k8scache.Indexer, k8scache.Controller)
NewInformer takes a controller and a set of resource handlers and returns an indexer and a controller that are subscribed to changes to the state of a NATS cluster resource.
Types ¶
type Controller ¶ added in v0.2.0
type Controller struct {
// contains filtered or unexported fields
}
Controller manages NATS Clusters running in Kubernetes.
func NewController ¶ added in v0.2.0
func NewController(opts *Options) *Controller
func (*Controller) Run ¶ added in v0.2.0
func (c *Controller) Run(ctx context.Context) error
Run starts the NATS Streaming operator controller loop.
func (*Controller) SetupClients ¶ added in v0.2.0
func (c *Controller) SetupClients(cfg *k8srestapi.Config) error
SetupClients takes the configuration and prepares the rest clients that will be used to interact with the cluster objects.
func (*Controller) SetupSignalHandler ¶ added in v0.2.0
func (c *Controller) SetupSignalHandler(ctx context.Context)
SetupSignalHandler enables handling process signals.
func (*Controller) Shutdown ¶ added in v0.2.0
func (c *Controller) Shutdown()
Shutdown stops the operator controller.
Click to show internal directories.
Click to hide internal directories.