config

package
v1.22.38 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSettingsNotBeenLoaded = errors.New("agent: settings has not been initialized")
)

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Zk *util.ZkClient

	Debug  bool
	Server string
	Token  string
	Port   int

	ProfileEnabled    bool
	ProfileEnabledStr string

	K8sEnabled   bool
	K8sCluster   bool
	K8sNodeName  string
	K8sPodName   string
	K8sPodIp     string
	K8sNamespace string

	Workspace    string
	LoggingDir   string
	PluginDir    string
	IsFromDocker bool

	Client api.Client

	VolumesStr string
	Volumes    []*domain.DockerVolume

	AppCtx context.Context
	Cancel context.CancelFunc
	// contains filtered or unexported fields
}

Manager to handle server connection and config

func GetInstance

func GetInstance() *Manager

GetInstance get singleton of config manager

func (*Manager) Close

func (m *Manager) Close()

Close release resources and connections

func (*Manager) FetchProfile

func (m *Manager) FetchProfile() *domain.AgentProfile

func (*Manager) FireEvent

func (m *Manager) FireEvent(event domain.AppEvent)

func (*Manager) Init

func (m *Manager) Init()

Jump to

Keyboard shortcuts

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