options

package
v0.0.0-...-c1a7e98 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package options contains flags and options for initializing a pump server

Index

Constants

View Source
const (
	// UserAgent is the userAgent name when starting monster-pump server.
	UserAgent = "monster-pump"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	HealthOptions *genericoptions.HealthOptions `json:"health" mapstructure:"health"`
	KafkaOptions  *genericoptions.KafkaOptions  `json:"kafka" mapstructure:"monitorKafka"`
	MongoOptions  *genericoptions.MongoOptions  `json:"mongo" mapstructure:"mongo"`
	FeatureGates  map[string]bool               `json:"feature-gates"`
}

Options contains state for master/api server.

func NewOptions

func NewOptions() *Options

NewOptions returns initialized Options.

func (*Options) ApplyTo

func (o *Options) ApplyTo(c *pump.Config) error

ApplyTo fills up monster-pump config with options.

func (*Options) Complete

func (o *Options) Complete() error

Complete completes all the required options.

func (*Options) Config

func (o *Options) Config() (*pump.Config, error)

Config return an monster-pump config object.

func (*Options) Flags

func (o *Options) Flags() (fss cliflag.NamedFlagSets)

Flags returns flags for a specific server by section name.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates all the required options.

Jump to

Keyboard shortcuts

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