Documentation
¶
Overview ¶
Package handler implements service debug handler embedded in go-micro services
Index ¶
- type Debug
- func (d *Debug) GetHealth() health.Health
- func (d *Debug) GetWrapperInfo() []map[string]any
- func (d *Debug) Health(ctx context.Context, req *proto.HealthRequest, rsp *proto.HealthResponse) error
- func (d *Debug) Log(ctx context.Context, req *proto.LogRequest, stream proto.Debug_LogStream) error
- func (d *Debug) MessageBus(ctx context.Context, stream proto.Debug_MessageBusStream) error
- func (d *Debug) SetAlive(alive bool)
- func (d *Debug) SetReady(ready bool)
- func (d *Debug) SetWrapperInfoProvider(provider WrapperInfoProvider)
- func (d *Debug) Stats(ctx context.Context, req *proto.StatsRequest, rsp *proto.StatsResponse) error
- func (d *Debug) Trace(ctx context.Context, req *proto.TraceRequest, rsp *proto.TraceResponse) error
- type WrapperInfoProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Debug ¶
type Debug struct {
// must honor the debug handler
proto.DebugHandler
// contains filtered or unexported fields
}
Debug is the debug handler for the service.
func NewHandler ¶
NewHandler returns an instance of the Debug Handler.
func (*Debug) GetHealth ¶
GetHealth returns the health manager for external use. This allows users to register custom health checkers.
func (*Debug) GetWrapperInfo ¶
GetWrapperInfo returns the wrapper information if a provider is set. Returns nil if no provider has been registered.
func (*Debug) Health ¶
func (d *Debug) Health(ctx context.Context, req *proto.HealthRequest, rsp *proto.HealthResponse) error
Health returns the health status of the service.
func (*Debug) Log ¶
func (d *Debug) Log(ctx context.Context, req *proto.LogRequest, stream proto.Debug_LogStream) error
func (*Debug) MessageBus ¶
func (*Debug) SetAlive ¶
SetAlive sets the liveness state of the service.
func (*Debug) SetReady ¶
SetReady sets the readiness state of the service.
func (*Debug) SetWrapperInfoProvider ¶
func (d *Debug) SetWrapperInfoProvider(provider WrapperInfoProvider)
SetWrapperInfoProvider sets the wrapper info provider function. This allows external packages to register their wrapper introspection capability.
func (*Debug) Stats ¶
func (d *Debug) Stats(ctx context.Context, req *proto.StatsRequest, rsp *proto.StatsResponse) error
func (*Debug) Trace ¶
func (d *Debug) Trace(ctx context.Context, req *proto.TraceRequest, rsp *proto.TraceResponse) error
Source Files
¶
- debug.go