Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MixedConfig ¶
type MixedConfig struct { // Role is an identifier for distinguish the role in spaceship since the server/client are not seperated. // supported roles: "server", "client" Role `json:"role"` // DNS is used for set up the custom dns as an upstream of global resolver. *dns.DNS `json:"dns,omitempty"` // CAs is used for append the custom CA to the system cert pool. CAs []string `json:"cas,omitempty"` // LogMode is used for set up specific log mod, defaults to stdout. LogMode logger.Mode `json:"log,omitempty"` *client.Client *server.Server }
MixedConfig is a server/client mixed config, along with general config.
func NewFromConfigFile ¶
func NewFromConfigFile(path string) (*MixedConfig, error)
NewFromConfigFile loads the config from the file in the specific path.
func NewFromString ¶
func NewFromString(c string) (*MixedConfig, error)
NewFromString loads the config from raw config string in json format (stick to the config structure).
Click to show internal directories.
Click to hide internal directories.