options

package
v0.0.0-...-6fe5f88 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// RPCServer is the address of the RPC server.
	RPCServer string `json:"rpcserver" mapstructure:"rpcserver"`

	// ClientCA represents the file path of the client certificate authority.
	ClientCA string `json:"client-ca-file" mapstructure:"client-cat-file"`

	// GenericServerOptions holds the options for running a generic server.
	GenericServerOptions *genericOptions.ServerRunOptions `json:"server" mapstructure:"server"`

	// InsecureServing options for running the server without TLS.
	InsecureServing *genericOptions.InsecureServingOptions `json:"insecure" mapstructure:"insecure"`

	// SecureServing options for running the server with TLS.
	SecureServing *genericOptions.SecureServingOptions `json:"secure" mapstructure:"secure"`

	// RedisOptions specifies the options for connecting to Redis.
	RedisOptions *genericOptions.RedisOptions `json:"redis" mapstructure:"redis"`

	// FeatureOptions holds configurations for specific features.
	FeatureOptions *genericOptions.FeatureOptions `json:"feature" mapstructure:"featrue"`

	// Log holds the logging configuration.
	Log *log.Options `json:"log" mapstucture:"log"`
}

Options struct defines the configuration options for the server.

func NewOptions

func NewOptions() *Options

NewOptions initializes a new Options object with default values.

func (*Options) ApplyTo

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

ApplyTo applies the options to the given server configuration.

func (*Options) Complete

func (o *Options) Complete() error

Complete finalizes the configuration of the secure serving options.

func (*Options) Flags

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

Flags defines and returns a set of flags for configuring the server.

func (*Options) String

func (o *Options) String() string

String returns a JSON representation of the options.

func (*Options) Validate

func (o *Options) Validate() []error

Jump to

Keyboard shortcuts

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