package
0.0.0-20220609042801-0905698132b1
Repository: https://github.com/opsdata/elmt-sdk.git
Documentation: pkg.go.dev
# Functions
BuildConfigFromFlags - a helper function that builds configs from a server url and .elmtconfig filepath
- 示例: config, err := clientcmd.BuildConfigFromFlags("", "/root/.elmt/config.yaml")
.
IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid.
IsEmptyConfig returns true if the provided error indicates the provided configuration is empty.
Load - take a byte slice and deserialize the contents into Config object - encapsulate deserialization without assuming the source is a file.
LoadFromFile - load config from file.
No description provided by the author
No description provided by the author
NewConfig is a convenience function that returns a new Config object with non-nil maps.
No description provided by the author
ParseTimeout - return a parsed duration from a string - a duration string value must be a positive integer, optionally followed by a corresponding time unit (s|m|h).
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ErrEmptyConfig defines no configuration has been provided error.
ErrEmptyServer defines a no server defined error.
ErrNoContext defines no context chosen error.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AuthInfo contains information that describes identity information.
Config defines a config struct used by sdk.
No description provided by the author
Server contains information about how to communicate with the elmt api server.
ZabbixInfo contains information that describes Zabbix JSON-RPC API information.
# Interfaces
ClientConfig interface - be used to make it easy to get an API server client - it returns a complete client config.