Documentation ¶
Overview ¶
Package server contains our gRPC server implementation for the ops server.
Index ¶
- type API
- func (a *API) Alerts(ctx context.Context, req *pb.AlertsReq) (*pb.AlertsResp, error)
- func (a *API) ChangeSampling(ctx context.Context, req *pb.ChangeSamplingReq) (*pb.ChangeSamplingResp, error)
- func (a *API) DeployedVersion(ctx context.Context, req *pb.DeployedVersionReq) (*pb.DeployedVersionResp, error)
- func (a *API) ListTraces(ctx context.Context, req *pb.ListTracesReq) (*pb.ListTracesResp, error)
- func (a *API) ShowLogs(ctx context.Context, req *pb.ShowLogsReq) (*pb.ShowLogsResp, error)
- func (a *API) ShowTrace(ctx context.Context, req *pb.ShowTraceReq) (*pb.ShowTraceResp, error)
- func (a *API) Start() error
- func (a *API) Stop()
- type Clients
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { pb.UnimplementedOpsServer // contains filtered or unexported fields }
API implements our gRPC server's API.
func (*API) ChangeSampling ¶
func (a *API) ChangeSampling(ctx context.Context, req *pb.ChangeSamplingReq) (*pb.ChangeSamplingResp, error)
ChangeSampling changes the sampling type and rate for the Petstore.
func (*API) DeployedVersion ¶
func (a *API) DeployedVersion(ctx context.Context, req *pb.DeployedVersionReq) (*pb.DeployedVersionResp, error)
DeployedVersion returns the version of the Petstore that prometheus says is current.
func (*API) ListTraces ¶
func (a *API) ListTraces(ctx context.Context, req *pb.ListTracesReq) (*pb.ListTracesResp, error)
ListTraces lists recent traces from Jaeger for the petstore service.
func (*API) ShowLogs ¶
func (a *API) ShowLogs(ctx context.Context, req *pb.ShowLogsReq) (*pb.ShowLogsResp, error)
func (*API) ShowTrace ¶
func (a *API) ShowTrace(ctx context.Context, req *pb.ShowTraceReq) (*pb.ShowTraceResp, error)
type Clients ¶
type Clients struct { // Jaeger provides access to traces. Jaeger *jaeger.Jaeger // Prom provides access to metrics. Prom *prom.Client // Petstore provides access to the petstore. Petstore *client.Client }
Clients holds the remote clients requires to do ops.
type Option ¶
type Option func(a *API)
Option is an optional arguments to New().
func WithGRPCOpts ¶
func WithGRPCOpts(opts ...grpc.ServerOption) Option
WithGRPCOpts creates the gRPC server with the options passed.
Click to show internal directories.
Click to hide internal directories.