master

package
v0.0.0-...-53e3d08 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mode   string         `yaml:"mode" json:"mode" default:"docker" validate:"regexp=^(native|docker)$"`
	Server Server         `yaml:"server" json:"server"`
	Logger logger.LogInfo `yaml:"logger" json:"logger"`
	Grace  time.Duration  `yaml:"grace" json:"grace" default:"30s"`
}

Config master init config

type Master

type Master struct {
	// contains filtered or unexported fields
}

Master master manages all modules and connects with cloud

func New

func New(pwd string, cfg Config, ver string) (*Master, error)

New creates a new master

func (*Master) Auth

func (m *Master) Auth(username, password string) bool

Auth auth api request from services

func (*Master) Close

func (m *Master) Close() error

Close closes agent

func (*Master) InspectSystem

func (m *Master) InspectSystem() *openedge.Inspect

InspectSystem inspects info and stats of openedge system

func (*Master) ReportInstance

func (m *Master) ReportInstance(serviceName, instanceName string, partialStats engine.PartialStats) error

ReportInstance reports the stats of the instance of the service

func (*Master) StartInstance

func (m *Master) StartInstance(service, instance string, dynamicConfig map[string]string) error

StartInstance starts a service instance

func (*Master) StopInstance

func (m *Master) StopInstance(service, instance string) error

StopInstance stops a service instance

func (*Master) UpdateSystem

func (m *Master) UpdateSystem(target string) error

UpdateSystem updates system

type Server

type Server struct {
	Address           string        `yaml:"address" json:"address" default:"unix:///var/run/openedge.sock"`
	Timeout           time.Duration `yaml:"timeout" json:"timeout" default:"5m"`
	utils.Certificate `yaml:",inline" json:",inline"`
}

Server server config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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