Documentation
¶
Index ¶
- func BackoffRetry(ctx context.Context, maxAttempts int, f RetryFunc) error
- func CheckHTTP(ctx context.Context, ID string, backends []string, code int, ...) bool
- func CheckTCP(ctx context.Context, ID string, backends []string, timeout time.Duration) bool
- func GetAppInfo(containerName string) (name, entrypoint, ident string, err error)
- func GetDevicePath(major, minor uint64) (string, error)
- func GetIP(daemonHost string) string
- func GetMaxAttemptsByTTL(ttl int64) int
- func IsDockerized() bool
- func LoadConfig(configPath string) (*types.Config, error)
- func MakeDockerClient(config *types.Config) (*engineapi.Client, error)
- func MakeYavirtClient(config *types.Config) (yavirtclient.Client, error)
- func NewBufPipe(bufCap int64) (*PipeReader, *PipeWriter)
- func ReplaceNonUtf8(str string) string
- func UseLabelAsFilter() bool
- func WithTimeout(ctx context.Context, timeout time.Duration, f func(ctx2 context.Context))
- func WritePid(ctx context.Context, path string)
- type GroupCAS
- type HashBackends
- type PipeReader
- type PipeWriter
- type RetryFunc
- type RetryTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackoffRetry ¶
BackoffRetry runs f up to maxAttempts times, doubling the wait after each failure.
func CheckHTTP ¶
func CheckHTTP(ctx context.Context, ID string, backends []string, code int, timeout time.Duration) bool
CheckHTTP reports whether every backend answers with the expected status code.
func GetAppInfo ¶
func GetDevicePath ¶
func GetMaxAttemptsByTTL ¶
func IsDockerized ¶
func IsDockerized() bool
func LoadConfig ¶
LoadConfig loads the agent config from the YAML file at configPath.
func MakeYavirtClient ¶
func MakeYavirtClient(config *types.Config) (yavirtclient.Client, error)
func NewBufPipe ¶
func NewBufPipe(bufCap int64) (*PipeReader, *PipeWriter)
func ReplaceNonUtf8 ¶
ReplaceNonUtf8 replaces non-utf8 characters in \x format.
func UseLabelAsFilter ¶
func UseLabelAsFilter() bool
func WithTimeout ¶
Types ¶
type GroupCAS ¶
type GroupCAS struct {
// contains filtered or unexported fields
}
GroupCAS is a set of compare-and-swap locks keyed by string.
func NewGroupCAS ¶
func NewGroupCAS() *GroupCAS
type HashBackends ¶
type HashBackends struct {
// contains filtered or unexported fields
}
func NewHashBackends ¶
func NewHashBackends(data []string) *HashBackends
func (*HashBackends) Len ¶
func (s *HashBackends) Len() int
type PipeReader ¶
type PipeReader struct {
// contains filtered or unexported fields
}
func (*PipeReader) Close ¶
func (r *PipeReader) Close() error
func (*PipeReader) CloseWithError ¶
func (r *PipeReader) CloseWithError(err error) error
CloseWithError closes the reader, later writes on the pipe return err.
type PipeWriter ¶
type PipeWriter struct {
// contains filtered or unexported fields
}
func (*PipeWriter) Close ¶
func (w *PipeWriter) Close() error
func (*PipeWriter) CloseWithError ¶
func (w *PipeWriter) CloseWithError(err error) error
Click to show internal directories.
Click to hide internal directories.