Documentation
¶
Overview ¶
Package macresources publishes bounded Mac CPU, memory, and network observations.
Index ¶
- Constants
- Variables
- func DefinitionForVersion(version string) pluginsdk.Definition
- type Collector
- type Config
- type Handler
- func (h *Handler) EndSession(ctx context.Context, request protocol.SessionEndRequest) error
- func (h *Handler) HandleSessionInput(ctx context.Context, request protocol.SessionInputRequest) (protocol.SessionInputResult, error)
- func (h *Handler) Health(_ context.Context) protocol.HealthResult
- func (h *Handler) ReplaceInstances(ctx context.Context, configured []protocol.Instance) error
- func (h *Handler) Shutdown(ctx context.Context) error
- func (h *Handler) StartSession(ctx context.Context, request protocol.SessionStartRequest) error
- type Host
- type RawSample
- type Ticker
Constants ¶
View Source
const ( PluginID = "dev.bsbctl.mac-resources" PluginVersion = "0.1.0" AppID = "mac-resources" ChannelSummary = "summary" ChannelPressure = "pressure" ChannelLive = "live" )
Variables ¶
View Source
var ErrUnsupported = errors.New("mac resources collection requires macOS with cgo enabled")
Functions ¶
func DefinitionForVersion ¶
func DefinitionForVersion(version string) pluginsdk.Definition
DefinitionForVersion binds immutable release metadata into the child handshake.
Types ¶
type Collector ¶
func NewNativeCollector ¶
func NewNativeCollector() Collector
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) EndSession ¶
func (*Handler) HandleSessionInput ¶
func (h *Handler) HandleSessionInput(ctx context.Context, request protocol.SessionInputRequest) (protocol.SessionInputResult, error)
func (*Handler) ReplaceInstances ¶
func (*Handler) StartSession ¶
type Host ¶
type Host interface {
PublishObservation(context.Context, protocol.Observation) error
CompleteSession(context.Context, protocol.CompleteSessionRequest) error
Log(context.Context, protocol.LogNotification) error
}
Click to show internal directories.
Click to hide internal directories.