options

package
v0.0.0-...-b5ed4c6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagPrecedence

func FlagPrecedence(args []string, c *config.AgentConfiguration) error

FlagPrecedence The Flag of the frp-provisioner is parsed again. The goal is for the data specified in flag to override the data in the configuration file

func LoadConfigFile

func LoadConfigFile(filename string, c *config.AgentConfiguration) error

LoadConfigFile Load the configuration file from disk and populate the structure Configuration

Types

type AgentFlags

type AgentFlags struct {
	ShowVersion bool
	ConfigFile  string
}

AgentFlags contains the command line parameters of the frp-provisioner. If any of the following conditions are met, the configuration field should be in CompassFlags instead of CompassConfiguration:

  • During the lifetime of a node, its value will never or cannot be changed safely, or
  • its value cannot be shared securely between nodes at the same time (eg: hostname);
  • Configuration is designed to be shared between nodes.

In general, please try to avoid adding tags or configuration fields, Because we already have a lot of confusing things.

func NewAgentFlags

func NewAgentFlags() *AgentFlags

NewAgentFlags A new NewAgentFlags structure will be created

func (*AgentFlags) AddFlags

func (f *AgentFlags) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags to the specified FlagSet

func (*AgentFlags) SetDefaults

func (f *AgentFlags) SetDefaults()

SetDefaults sets the default values.

func (*AgentFlags) Validate

func (f *AgentFlags) Validate() error

Validate Verify that the structure meets the requirements

Jump to

Keyboard shortcuts

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