types

package
v0.0.0-...-3c85401 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Addr string `yaml:"addr"`
}

type CPUStats

type CPUStats struct {
	UsageInUserMode   uint64
	UsageInSystemMode uint64
	ReadingTS         uint64
}

type Config

type Config struct {
	PidFile             string `yaml:"pid"`
	HealthCheckInterval int    `yaml:"health_check_interval"`
	HealthCheckTimeout  int    `yaml:"health_check_timeout"`
	Core                string `yaml:"core"`
	HostName            string `yaml:"-"`

	Docker  DockerConfig
	Metrics MetricsConfig
	API     APIConfig
	Log     LogConfig
}

func (*Config) LoadConfigFromFile

func (config *Config) LoadConfigFromFile(configPath string) error

LoadConfigFromFile 从config path指定的文件加载config 失败就算了, 反正也要从cli覆写的

func (*Config) PrepareConfig

func (config *Config) PrepareConfig(c *cli.Context)

PrepareConfig 从cli覆写并做准备

type Container

type Container struct {
	ID          string
	Pid         int
	Running     bool
	Healthy     bool
	Name        string
	EntryPoint  string
	Ident       string
	Version     string
	CPUQuota    int64
	CPUPeriod   int64
	CPUShares   int64
	Memory      int64
	Extend      map[string]string
	Publish     map[string]string
	Networks    map[string]*network.EndpointSettings `json:"-"`
	HealthCheck *HealthCheck                         `json:"-"`
}

type DockerConfig

type DockerConfig struct {
	Endpoint string `yaml:"endpoint"`
}

type HealthCheck

type HealthCheck struct {
	Ports []string
	Code  int
	URL   string
}

type Log

type Log struct {
	ID         string            `json:"id"`
	Name       string            `json:"name"`
	Type       string            `json:"type"`
	EntryPoint string            `json:"entrypoint"`
	Ident      string            `json:"ident"`
	Data       string            `json:"data"`
	Datetime   string            `json:"datetime"`
	Extra      map[string]string `json:"extra"`
}

type LogConfig

type LogConfig struct {
	Forwards []string `yaml:"forwards"`
	Stdout   bool     `yaml:"stdout"`
}

type LogConsumer

type LogConsumer struct {
	ID   string
	App  string
	Conn net.Conn
	Buf  *bufio.ReadWriter
}

type MemoryStats

type MemoryStats struct {
	Usage    uint64
	MaxUsage uint64
	Detail   map[string]uint64
}

type MetricsConfig

type MetricsConfig struct {
	Step      int64    `yaml:"step"`
	Transfers []string `yaml:"transfers"`
}

type PrevCheck

type PrevCheck struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPrevCheck

func NewPrevCheck() *PrevCheck

func (*PrevCheck) Del

func (p *PrevCheck) Del(ID string)

func (*PrevCheck) Get

func (p *PrevCheck) Get(ID string) bool

func (*PrevCheck) Set

func (p *PrevCheck) Set(ID string, f bool)

Jump to

Keyboard shortcuts

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