options

package
v1.23.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentOptions

type AgentOptions 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 NewDefaultAgentOptions

func NewDefaultAgentOptions() *AgentOptions

type ClientTLS

type ClientTLS struct {
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}

type HubOptions

type HubOptions struct {
	Listen         string `json:"listen,omitempty"`
	ListenGrpc     string `json:"listenGrpc,omitempty"`
	Host           string `json:"host,omitempty" validate:"required"`
	ServerID       string `json:"serverID,omitempty" validate:"required"`
	TLS            *TLS   `json:"tls,omitempty"`
	EdgeServerAddr string `json:"edgeServerAddr,omitempty"`
}

func NewDefaultHub

func NewDefaultHub() *HubOptions

type ServerOptions

type ServerOptions struct {
	Listen     string           `json:"listen,omitempty"`
	Host       string           `json:"host,omitempty"`
	ListenGrpc string           `json:"listenGrpc,omitempty"`
	ServerID   string           `json:"serverID,omitempty"`
	TLS        *TLS             `json:"tls,omitempty"`
	Database   database.Options `json:"database,omitempty"`
}

func NewDefaultServer

func NewDefaultServer() *ServerOptions

type TLS

type TLS struct {
	CertFile           string `json:"certFile,omitempty"`
	KeyFile            string `json:"keyFile,omitempty"`
	CAFile             string `json:"caFile,omitempty"`
	ClientAuth         bool   `json:"clientAuth,omitempty"`
	InsecureSkipVerify bool   `json:"insecureSkipVerify,omitempty"`
}

func NewDefaultTLS

func NewDefaultTLS() *TLS

func (TLS) ToTLSConfig

func (o TLS) ToTLSConfig() (*tls.Config, error)

Jump to

Keyboard shortcuts

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