Documentation ¶
Index ¶
- type Babysitter
- func (b *Babysitter) ActivateComponent(ctx context.Context, req *protos.ActivateComponentRequest) (*protos.ActivateComponentReply, error)
- func (b *Babysitter) CheckHealth(_ context.Context, req *protos.GetHealthRequest) (*protos.GetHealthReply, error)
- func (b *Babysitter) ExportListener(ctx context.Context, req *protos.ExportListenerRequest) (*protos.ExportListenerReply, error)
- func (b *Babysitter) GetListenerAddress(ctx context.Context, req *protos.GetListenerAddressRequest) (*protos.GetListenerAddressReply, error)
- func (b *Babysitter) HandleLogEntry(_ context.Context, entry *protos.LogEntry) error
- func (b *Babysitter) HandleTraceSpans(_ context.Context, traces []trace.ReadOnlySpan) error
- func (b *Babysitter) Run() error
- func (b *Babysitter) RunProfiling(_ context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error)
- type HttpClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Babysitter ¶
type Babysitter struct {
// contains filtered or unexported fields
}
Babysitter starts and manages a weavelet inside the Pod.
func NewBabysitter ¶
func NewBabysitter( ctx context.Context, cfg *config.GKEConfig, replicaSet string, podName string, useLocalhost bool, manager clients.ManagerClient, logSaver func(*protos.LogEntry), traceSaver func(spans []trace.ReadOnlySpan) error, metricExporter func(metrics []*metrics.MetricSnapshot) error) (*Babysitter, error)
NewBabysitter returns a new babysitter.
func (*Babysitter) ActivateComponent ¶ added in v0.2.0
func (b *Babysitter) ActivateComponent(ctx context.Context, req *protos.ActivateComponentRequest) (*protos.ActivateComponentReply, error)
ActivateComponent implements the envelope.EnvelopeHandler interface.
func (*Babysitter) CheckHealth ¶
func (b *Babysitter) CheckHealth(_ context.Context, req *protos.GetHealthRequest) (*protos.GetHealthReply, error)
CheckHealth implements the clients.BabysitterClient interface.
func (*Babysitter) ExportListener ¶ added in v0.2.0
func (b *Babysitter) ExportListener(ctx context.Context, req *protos.ExportListenerRequest) (*protos.ExportListenerReply, error)
ExportListener implements the envelope.EnvelopeHandler interface.
func (*Babysitter) GetListenerAddress ¶ added in v0.2.0
func (b *Babysitter) GetListenerAddress(ctx context.Context, req *protos.GetListenerAddressRequest) (*protos.GetListenerAddressReply, error)
GetListenerAddress implements the envelope.EnvelopeHandler interface.
func (*Babysitter) HandleLogEntry ¶ added in v0.2.0
HandleLogEntry implements the envelope.EnvelopeHandler interface.
func (*Babysitter) HandleTraceSpans ¶ added in v0.2.0
func (b *Babysitter) HandleTraceSpans(_ context.Context, traces []trace.ReadOnlySpan) error
HandleTraceSpans implements the envelope.EnvelopeHandler interface.
func (*Babysitter) Run ¶
func (b *Babysitter) Run() error
Run runs the babysitter. This call will block until the context passed to NewBabysitter is canceled.
func (*Babysitter) RunProfiling ¶
func (b *Babysitter) RunProfiling(_ context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error)
RunProfiling implements the clients.BabysitterClient interface.
type HttpClient ¶
type HttpClient struct {
Addr string // babysitter address
}
HttpClient is a Client that executes requests over HTTP.
func (*HttpClient) CheckHealth ¶
func (h *HttpClient) CheckHealth(ctx context.Context, req *protos.GetHealthRequest) (*protos.GetHealthReply, error)
CheckHealth implements the clients.BabysitterClient interface.
func (*HttpClient) RunProfiling ¶
func (h *HttpClient) RunProfiling(ctx context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error)
RunProfiling implements the clients.BabysitterClient interface.