options

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package options contains flags and options for initializing an apiserver

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerOptions

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

ServerOptions contains the configuration options for the server.

func NewServerOptions

func NewServerOptions() *ServerOptions

NewServerOptions creates a ServerOptions instance with default values.

func (*ServerOptions) Complete

func (o *ServerOptions) Complete() error

Complete completes all the required options.

func (*ServerOptions) Config

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

Config builds an pump.Config based on ServerOptions.

func (*ServerOptions) Flags

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

Flags returns flags for a specific server by section name.

func (*ServerOptions) Validate

func (o *ServerOptions) Validate() error

Validate checks whether the options in ServerOptions are valid.

Jump to

Keyboard shortcuts

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