Documentation ¶
Index ¶
- type Babysitter
- func (b *Babysitter) ActivateComponent(ctx context.Context, req *protos.ActivateComponentRequest) (*protos.ActivateComponentReply, 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) GetLoad(_ context.Context, req *endpoints.GetLoadRequest) (*endpoints.GetLoadReply, error)
- func (b *Babysitter) GetSelfCertificate(context.Context, *protos.GetSelfCertificateRequest) (*protos.GetSelfCertificateReply, error)
- func (b *Babysitter) HandleLogEntry(_ context.Context, entry *protos.LogEntry) error
- func (b *Babysitter) HandleTraceSpans(_ context.Context, traces *protos.TraceSpans) error
- func (b *Babysitter) LogBatch(ctx context.Context, batch *protos.LogEntryBatch) error
- func (b *Babysitter) RunProfiling(_ context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error)
- func (b *Babysitter) SelfAddr() string
- func (b *Babysitter) VerifyClientCertificate(_ context.Context, req *protos.VerifyClientCertificateRequest) (*protos.VerifyClientCertificateReply, error)
- func (b *Babysitter) VerifyServerCertificate(_ context.Context, req *protos.VerifyServerCertificateRequest) (*protos.VerifyServerCertificateReply, error)
- func (b *Babysitter) WeaveletAddress() string
- 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 Start ¶ added in v0.18.0
func Start( ctx context.Context, logger *slog.Logger, cfg *config.GKEConfig, replicaSet string, projectName string, podName string, internalAddress string, mux *http.ServeMux, selfAddr string, manager endpoints.Manager, caCert *x509.Certificate, getSelfCert func() ([]byte, []byte, error), logSaver func(*protos.LogEntry), traceSaver func(spans *protos.TraceSpans) error, metricExporter func(metrics []*metrics.MetricSnapshot) error, ) (*Babysitter, error)
Start creates and starts 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) 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) GetLoad ¶ added in v0.22.1
func (b *Babysitter) GetLoad(_ context.Context, req *endpoints.GetLoadRequest) (*endpoints.GetLoadReply, error)
GetLoad implements the endpoints.Babysitter interface.
func (*Babysitter) GetSelfCertificate ¶ added in v0.12.0
func (b *Babysitter) GetSelfCertificate(context.Context, *protos.GetSelfCertificateRequest) (*protos.GetSelfCertificateReply, error)
GetSelfCertificate 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 *protos.TraceSpans) error
HandleTraceSpans implements the envelope.EnvelopeHandler interface.
func (*Babysitter) LogBatch ¶ added in v0.23.0
func (b *Babysitter) LogBatch(ctx context.Context, batch *protos.LogEntryBatch) error
LogBatch implements the control.DeployerControl interface.
func (*Babysitter) RunProfiling ¶
func (b *Babysitter) RunProfiling(_ context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error)
RunProfiling implements the endpoints.Babysitter interface.
func (*Babysitter) SelfAddr ¶ added in v0.22.1
func (b *Babysitter) SelfAddr() string
SelfAddr returns the address on which the babysitter is listening on for incoming requests.
func (*Babysitter) VerifyClientCertificate ¶ added in v0.7.0
func (b *Babysitter) VerifyClientCertificate(_ context.Context, req *protos.VerifyClientCertificateRequest) (*protos.VerifyClientCertificateReply, error)
VerifyClientCertificate implements the envelope.EnvelopeHandler interface.
func (*Babysitter) VerifyServerCertificate ¶ added in v0.7.0
func (b *Babysitter) VerifyServerCertificate(_ context.Context, req *protos.VerifyServerCertificateRequest) (*protos.VerifyServerCertificateReply, error)
VerifyServerCertificate implements the envelope.EnvelopeHandler interface.
func (*Babysitter) WeaveletAddress ¶ added in v0.23.0
func (b *Babysitter) WeaveletAddress() string
WeaveletAddress returns the address that other components should dial to communicate with the weavelet.
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
HttpClient is a Client that executes requests over HTTP.
func NewHttpClient ¶ added in v0.23.2
func NewHttpClient(addr string, tlsConfig *tls.Config) *HttpClient
func (*HttpClient) GetLoad ¶ added in v0.22.1
func (h *HttpClient) GetLoad(ctx context.Context, req *endpoints.GetLoadRequest) (*endpoints.GetLoadReply, error)
GetLoad implements the endpoints.Babysitter interface.
func (*HttpClient) RunProfiling ¶
func (h *HttpClient) RunProfiling(ctx context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error)
RunProfiling implements the endpoints.Babysitter interface.