options

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 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-fakeserver server.
	UserAgent = "onex-fakeserver"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	FakeStore     bool                           `json:"fake-store" mapstructure:"fake-store"`
	GRPCOptions   *genericoptions.GRPCOptions    `json:"grpc" mapstructure:"grpc"`
	HTTPOptions   *genericoptions.HTTPOptions    `json:"http" mapstructure:"http"`
	TLSOptions    *genericoptions.TLSOptions     `json:"tls" mapstructure:"tls"`
	MySQLOptions  *genericoptions.MySQLOptions   `json:"mysql" mapstructure:"mysql"`
	JaegerOptions *genericoptions.JaegerOptions  `json:"jaeger" mapstructure:"jaeger"`
	Metrics       *genericoptions.MetricsOptions `json:"metrics" mapstructure:"metrics"`
	Log           *log.Options                   `json:"log" mapstructure:"log"`

	// Path to kubeconfig file with authorization and master location information.
	Kubeconfig   string          `json:"kubeconfig" mapstructure:"kubeconfig"`
	FeatureGates map[string]bool `json:"feature-gates" mapstructure:"-"`
}

Options contains state for master/api server.

func NewOptions

func NewOptions() *Options

NewOptions returns initialized Options.

func (*Options) ApplyTo

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

ApplyTo fills up onex-fakeserver config with options.

func (*Options) Complete

func (o *Options) Complete() error

Complete completes all the required options.

func (*Options) Config

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

Config return a onex-fakeserver 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