Documentation ¶
Index ¶
- Constants
- func AddService(name string, service Service)
- func GetService(name string, service Service) error
- func NewSystemService(config *service.Config, agent *Agent) (service.Service, error)
- func Register(agent *Agent) error
- func SystemCpuUsageCheck(agent *Agent)
- func SystemLoadCheck(agent *Agent)
- func SystemResourceLimit(agent *Agent) error
- type Agent
- type Config
- type Logger
- type Notify
- type Plugin
- type Service
Constants ¶
View Source
const (
CgroupRootPath = "/cgroup"
)
Variables ¶
This section is empty.
Functions ¶
func AddService ¶
func GetService ¶
func NewSystemService ¶
初始化一个服务
Types ¶
type Agent ¶
type Notify ¶
type Notify struct {
// contains filtered or unexported fields
}
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
util
|
|
retry
Simple library for retry mechanism slightly inspired by [Try::Tiny::Retry](https://metacpan.org/pod/Try::Tiny::Retry) SYNOPSIS http get with retry: url := "http://example.com" var body []byte err := retry.Do( func() error { resp, err := http.Get(url) if err != nil { return err } defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return err } return nil }, ) fmt.Println(body) [next examples](https://github.com/avast/retry-go/tree/master/examples) SEE ALSO * [giantswarm/retry-go](https://github.com/giantswarm/retry-go) - slightly complicated interface.
|
Simple library for retry mechanism slightly inspired by [Try::Tiny::Retry](https://metacpan.org/pod/Try::Tiny::Retry) SYNOPSIS http get with retry: url := "http://example.com" var body []byte err := retry.Do( func() error { resp, err := http.Get(url) if err != nil { return err } defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return err } return nil }, ) fmt.Println(body) [next examples](https://github.com/avast/retry-go/tree/master/examples) SEE ALSO * [giantswarm/retry-go](https://github.com/giantswarm/retry-go) - slightly complicated interface. |
Click to show internal directories.
Click to hide internal directories.