config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfigure

func InitConfigure(cc *ControllerConfig)

InitConfigure inits config

Types

type ControllerConfig

type ControllerConfig struct {
	// KubeAPIConfig indicates the kubernetes cluster info which controller will connected
	KubeConfig string `json:"kubeConfig,omitempty"`

	// Master indicates the address of the Kubernetes API server. Overrides any value in KubeConfig.
	// such as https://127.0.0.1:8443
	// default ""
	Master string `json:"master"`
	// Namespace indicates which namespace the controller listening to.
	// default ""
	Namespace string `json:"namespace,omitempty"`

	// websocket server config
	// Since the current limit of kubeedge(1.5), GM needs to build the websocket channel for communicating between GM and LCs.
	WebSocket WebSocket `json:"websocket,omitempty"`

	// lc config to info the worker
	LC LCConfig `json:"localController,omitempty"`

	// kb config to info the worker
	KB KBConfig `json:"knowledgeBaseServer,omitempty"`
}

ControllerConfig indicates the config of controller

var Config ControllerConfig

Config singlton for GM

func NewDefaultControllerConfig

func NewDefaultControllerConfig() *ControllerConfig

NewDefaultControllerConfig creates default config

func (*ControllerConfig) Parse

func (c *ControllerConfig) Parse(filename string) error

Parse parses from filename

func (*ControllerConfig) Validate

func (c *ControllerConfig) Validate() field.ErrorList

Validate validate the config

type KBConfig added in v0.3.0

type KBConfig struct {
	// default defaultKBServer
	Server string `json:"server"`
}

KBConfig describes KB config to inject the worker

type LCConfig

type LCConfig struct {
	// default defaultLCServer
	Server string `json:"server"`
}

LCConfig describes LC config to inject the worker

type WebSocket

type WebSocket struct {
	// default defaultWebsocketAddress
	Address string `json:"address,omitempty"`
	// default defaultWebsocketPort
	Port int64 `json:"port,omitempty"`
}

WebSocket describes GM of websocket config

Jump to

Keyboard shortcuts

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