Documentation ¶
Index ¶
- Constants
- func NewSampler(param *StatsParameter) (sampling.Sampler, error)
- func RegisterContainerHandlerFactory(path string, factory ContainerHandlerFactory)
- func SetStatsParameter(param *StatsParameter)
- type ContainerHandler
- func AddStatsSummary(handler ContainerHandler, parameter *StatsParameter) (ContainerHandler, error)
- func NewBlackListFilter(handler ContainerHandler, forbiddenPaths ...string) ContainerHandler
- func NewContainerHandler(path string) (ContainerHandler, error)
- func NewWhiteListFilter(handler ContainerHandler, acceptedPaths ...string) ContainerHandler
- type ContainerHandlerFactory
- type ListType
- type NoStatsSummary
- type StatsParameter
Constants ¶
View Source
const ( LIST_SELF = iota LIST_RECURSIVE )
Listing types.
Variables ¶
This section is empty.
Functions ¶
func NewSampler ¶
func NewSampler(param *StatsParameter) (sampling.Sampler, error)
func RegisterContainerHandlerFactory ¶
func RegisterContainerHandlerFactory(path string, factory ContainerHandlerFactory)
func SetStatsParameter ¶
func SetStatsParameter(param *StatsParameter)
Types ¶
type ContainerHandler ¶
type ContainerHandler interface { GetSpec() (*info.ContainerSpec, error) GetStats() (*info.ContainerStats, error) ListContainers(listType ListType) ([]info.ContainerReference, error) ListThreads(listType ListType) ([]int, error) ListProcesses(listType ListType) ([]int, error) StatsSummary() (*info.ContainerStatsPercentiles, error) }
Interface for container operation handlers.
func AddStatsSummary ¶
func AddStatsSummary(handler ContainerHandler, parameter *StatsParameter) (ContainerHandler, error)
func NewBlackListFilter ¶
func NewBlackListFilter(handler ContainerHandler, forbiddenPaths ...string) ContainerHandler
func NewContainerHandler ¶
func NewContainerHandler(path string) (ContainerHandler, error)
func NewWhiteListFilter ¶
func NewWhiteListFilter(handler ContainerHandler, acceptedPaths ...string) ContainerHandler
type ContainerHandlerFactory ¶
type ContainerHandlerFactory interface { NewContainerHandler(name string) (ContainerHandler, error) // for testability String() string }
func AddStatsSummaryToFactory ¶
func AddStatsSummaryToFactory(factory ContainerHandlerFactory) ContainerHandlerFactory
This is a decorator for container factory. If the container handler created by a container factory does not implement stats summary method, then the factory could be decorated with this structure.
type NoStatsSummary ¶
type NoStatsSummary struct { }
func (*NoStatsSummary) StatsSummary ¶
func (self *NoStatsSummary) StatsSummary() (*info.ContainerStatsPercentiles, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.