config

package
v0.0.0-...-6265879 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultSubmarineTimeout default Submarine timeout (ms)
	DefaultSubmarineTimeout = 2000
	//DefaultClusterNodeTimeout default cluster node timeout (ms)
	//The maximum amount of time a Submarine Cluster node can be unavailable, without it being considered as failing
	DefaultClusterNodeTimeout = 2000
	// SubmarineRenameCommandsDefaultPath default path to volume storing rename commands
	SubmarineRenameCommandsDefaultPath = "/etc/secret-volume"
	// SubmarineRenameCommandsDefaultFile default file name containing rename commands
	SubmarineRenameCommandsDefaultFile = ""
	// SubmarineConfigFileDefault default config file path
	SubmarineConfigFileDefault = "/submarine-conf/submarine.conf"
	// SubmarineServerBinDefault default binary name
	SubmarineServerBinDefault = "submarine-server"
	// SubmarineServerPortDefault default Submarine port
	SubmarineServerPortDefault = "6379"
	// SubmarineMaxMemoryDefault default Submarine max memory
	SubmarineMaxMemoryDefault = 0
	// SubmarineMaxMemoryPolicyDefault default Submarine max memory eviction policy
	SubmarineMaxMemoryPolicyDefault = "noeviction"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Namespace   string
	NodeService string
}

Cluster used to store all Submarine Cluster configuration information

func (*Cluster) AddFlags

func (c *Cluster) AddFlags(fs *pflag.FlagSet)

AddFlags use to add the Submarine-Cluster Config flags to the command line

type Submarine

type Submarine struct {
	DialTimeout        int
	ClusterNodeTimeout int
	ConfigFileName     string

	HTTPServerAddr  string
	ServerBin       string
	ServerPort      string
	ServerIP        string
	MaxMemory       uint32
	MaxMemoryPolicy string
	ConfigFiles     []string
	// contains filtered or unexported fields
}

Submarine used to store all Submarine configuration information

func (*Submarine) AddFlags

func (r *Submarine) AddFlags(fs *pflag.FlagSet)

AddFlags use to add the Submarine Config flags to the command line

func (*Submarine) GetRenameCommandsFile

func (r *Submarine) GetRenameCommandsFile() string

GetRenameCommandsFile return the path to the rename command file, or empty string if not define

func (Submarine) String

func (r Submarine) String() string

String stringer interface

Jump to

Keyboard shortcuts

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