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: 6 Imported by: 0

Documentation

Overview

Package options provides flags and configuration for initializing the Onex Cache Server.

Index

Constants

View Source
const UserAgent = "onex-cacheserver"

UserAgent is the default name used for the Onex Cache Server client.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerOptions

type ServerOptions struct {
	DisableCache   bool                           `json:"disable-cache" mapstructure:"disable-cache"`
	GRPCOptions    *genericoptions.GRPCOptions    `json:"grpc" mapstructure:"grpc"`
	TLSOptions     *genericoptions.TLSOptions     `json:"tls" mapstructure:"tls"`
	RedisOptions   *genericoptions.RedisOptions   `json:"redis" mapstructure:"redis"`
	MySQLOptions   *genericoptions.MySQLOptions   `json:"mysql" mapstructure:"mysql"`
	JaegerOptions  *genericoptions.JaegerOptions  `json:"jaeger" mapstructure:"jaeger"`
	MetricsOptions *genericoptions.MetricsOptions `json:"metrics" mapstructure:"metrics"`
	Logging        *log.Options                   `json:"log" mapstructure:"log"`
}

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() (*cacheserver.Config, error)

Config builds an cacheserver.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