Documentation ¶
Index ¶
- Constants
- func DetectExternalIP() string
- func ParseJSONFile(content []byte) (map[string]string, error)
- func ParseKV(file string) (map[string]string, error)
- func ParseKVFile(content []byte) (map[string]string, error)
- func ParseToMaps(list []string) map[string]string
- func ReadManufacture(options *Options, clientID string) (map[string]string, error)
- func Run(ctx context.Context, options *Options) error
- type AgentAPI
- type ClientTLS
- type EdgeAgent
- type Options
Constants ¶
View Source
const ( ClientIDSecret = "kubegems-edge-agent-id" DefaultKeepAliveInterval = 30 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func DetectExternalIP ¶ added in v1.23.8
func DetectExternalIP() string
func ParseKVFile ¶
ParseKVFile parse kv from FOO="bar" likes file
func ParseToMaps ¶
func ReadManufacture ¶
Types ¶
type ClientTLS ¶ added in v1.23.8
type ClientTLS struct {
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}
type Options ¶ added in v1.23.8
type Options struct { Listen string `json:"listen,omitempty"` DeviceID string `json:"deviceID,omitempty" description:"device id in kubegems edge,use random generated client-id by default"` DeviceIDKey string `json:"deviceIDKey,omitempty" description:"use value of key as device-id in manufacture"` ManufactureFile []string `json:"manufactureFile,omitempty" description:"file with manufacture info in json object format"` ManufactureRemap []string `json:"manufactureRemap,omitempty" description:"remap manufacture file key to newkey,example 'newkey=existskey'"` Manufacture []string `json:"manufacture,omitempty" description:"manufacture kvs,example 'some-key=value,foo=bar'"` EdgeHubAddr string `json:"edgeHubAddr,omitempty"` KeepAliveInterval time.Duration `json:"keepAliveInterval,omitempty"` TLS *ClientTLS `json:"tls,omitempty" description:"skip server tls verify"` }
func NewDefaultOptions ¶ added in v1.23.8
func NewDefaultOptions() *Options
Click to show internal directories.
Click to hide internal directories.