v1

package
v0.74.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Overview

Package monitoring/v1 contains the API used to monitor deployments.

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (

	// FormatText defines the log format to be text
	FormatText = "text"
	// FormatJson defines the log format to be json.
	// In JSON format, log lines are encoded as a single line JSON object.
	FormatJSON = "json"
)
View Source
const (
	// ServerRoleAgents defines the role filter for agents
	ServerRoleAgents = "agents"
	// ServerRoleCoordinators defines the role filter for coordinators
	ServerRoleCoordinators = "coordinators"
	// ServerRoleDBServers defines the role filter for dbservers
	ServerRoleDBServers = "dbservers"
	// ServerRoleSingles defines the role filter for singles
	ServerRoleSingles = "singles"
)
View Source
const (
	// APIID contains identifier of this API
	APIID = "monitoring/v1"
	// APIMajorVersion contains major version of this API
	APIMajorVersion = 1
	// APIMinorVersion contains minor version of this API
	APIMinorVersion = 3
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 0
)
View Source
const (

	// PermissionLogsGet is needed for gettings logs from a deployment.
	PermissionLogsGet = "monitoring.logs.get"
)

Variables

View Source
var (
	ErrInvalidLengthMonitoring        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMonitoring          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMonitoring = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterMonitoringServiceHandler

func RegisterMonitoringServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMonitoringServiceHandler registers the http handlers for service MonitoringService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMonitoringServiceHandlerClient

func RegisterMonitoringServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MonitoringServiceClient) error

RegisterMonitoringServiceHandlerClient registers the http handlers for service MonitoringService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MonitoringServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MonitoringServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MonitoringServiceClient" to call the correct interceptors.

func RegisterMonitoringServiceHandlerFromEndpoint

func RegisterMonitoringServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMonitoringServiceHandlerFromEndpoint is same as RegisterMonitoringServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMonitoringServiceHandlerServer

func RegisterMonitoringServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MonitoringServiceServer) error

RegisterMonitoringServiceHandlerServer registers the http handlers for service MonitoringService to "mux". UnaryRPC :call MonitoringServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterMonitoringServiceServer

func RegisterMonitoringServiceServer(s *grpc.Server, srv MonitoringServiceServer)

Types

type DeploymentLogsChunk

type DeploymentLogsChunk struct {
	// Chunk of bytes from the logs
	Chunk                []byte   `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeploymentLogsChunk) Descriptor

func (*DeploymentLogsChunk) Descriptor() ([]byte, []int)

func (*DeploymentLogsChunk) GetChunk

func (m *DeploymentLogsChunk) GetChunk() []byte

func (*DeploymentLogsChunk) Marshal

func (m *DeploymentLogsChunk) Marshal() (dAtA []byte, err error)

func (*DeploymentLogsChunk) MarshalTo

func (m *DeploymentLogsChunk) MarshalTo(dAtA []byte) (int, error)

func (*DeploymentLogsChunk) MarshalToSizedBuffer

func (m *DeploymentLogsChunk) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeploymentLogsChunk) ProtoMessage

func (*DeploymentLogsChunk) ProtoMessage()

func (*DeploymentLogsChunk) Reset

func (m *DeploymentLogsChunk) Reset()

func (*DeploymentLogsChunk) Size

func (m *DeploymentLogsChunk) Size() (n int)

func (*DeploymentLogsChunk) String

func (m *DeploymentLogsChunk) String() string

func (*DeploymentLogsChunk) Unmarshal

func (m *DeploymentLogsChunk) Unmarshal(dAtA []byte) error

func (*DeploymentLogsChunk) XXX_DiscardUnknown

func (m *DeploymentLogsChunk) XXX_DiscardUnknown()

func (*DeploymentLogsChunk) XXX_Marshal

func (m *DeploymentLogsChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeploymentLogsChunk) XXX_Merge

func (m *DeploymentLogsChunk) XXX_Merge(src proto.Message)

func (*DeploymentLogsChunk) XXX_Size

func (m *DeploymentLogsChunk) XXX_Size() int

func (*DeploymentLogsChunk) XXX_Unmarshal

func (m *DeploymentLogsChunk) XXX_Unmarshal(b []byte) error

type GetDeploymentLogsRequest

type GetDeploymentLogsRequest struct {
	// Identifier of the deployment to get the logs from.
	DeploymentId string `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"`
	// If set, limit logs to servers of this role.
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// Formatting for log messages.
	// The possible values are text and json, with default value being text.
	Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
	// If set limits logs to the server with this ID.
	ServerId string `protobuf:"bytes,4,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// The start time for the query. Defaults to one hour ago.
	StartAt *types.Timestamp `protobuf:"bytes,100,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"`
	// The end time for the query. Defaults to now.
	EndAt *types.Timestamp `protobuf:"bytes,101,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"`
	// Limit the number of log lines. Defaults to 1000.
	Limit                int32    `protobuf:"varint,102,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GetDeploymentLogsRequest contains request arguments for GetDeploymentLogs.

func (*GetDeploymentLogsRequest) Descriptor

func (*GetDeploymentLogsRequest) Descriptor() ([]byte, []int)

func (*GetDeploymentLogsRequest) GetDeploymentId

func (m *GetDeploymentLogsRequest) GetDeploymentId() string

func (*GetDeploymentLogsRequest) GetEndAt added in v0.43.1

func (m *GetDeploymentLogsRequest) GetEndAt() *types.Timestamp

func (*GetDeploymentLogsRequest) GetFormat added in v0.43.6

func (m *GetDeploymentLogsRequest) GetFormat() string

func (*GetDeploymentLogsRequest) GetLimit added in v0.43.1

func (m *GetDeploymentLogsRequest) GetLimit() int32

func (*GetDeploymentLogsRequest) GetRole

func (m *GetDeploymentLogsRequest) GetRole() string

func (*GetDeploymentLogsRequest) GetServerId added in v0.46.1

func (m *GetDeploymentLogsRequest) GetServerId() string

func (*GetDeploymentLogsRequest) GetStartAt added in v0.43.1

func (m *GetDeploymentLogsRequest) GetStartAt() *types.Timestamp

func (*GetDeploymentLogsRequest) Marshal

func (m *GetDeploymentLogsRequest) Marshal() (dAtA []byte, err error)

func (*GetDeploymentLogsRequest) MarshalTo

func (m *GetDeploymentLogsRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetDeploymentLogsRequest) MarshalToSizedBuffer

func (m *GetDeploymentLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetDeploymentLogsRequest) ProtoMessage

func (*GetDeploymentLogsRequest) ProtoMessage()

func (*GetDeploymentLogsRequest) Reset

func (m *GetDeploymentLogsRequest) Reset()

func (*GetDeploymentLogsRequest) Size

func (m *GetDeploymentLogsRequest) Size() (n int)

func (*GetDeploymentLogsRequest) String

func (m *GetDeploymentLogsRequest) String() string

func (*GetDeploymentLogsRequest) Unmarshal

func (m *GetDeploymentLogsRequest) Unmarshal(dAtA []byte) error

func (*GetDeploymentLogsRequest) XXX_DiscardUnknown

func (m *GetDeploymentLogsRequest) XXX_DiscardUnknown()

func (*GetDeploymentLogsRequest) XXX_Marshal

func (m *GetDeploymentLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetDeploymentLogsRequest) XXX_Merge

func (m *GetDeploymentLogsRequest) XXX_Merge(src proto.Message)

func (*GetDeploymentLogsRequest) XXX_Size

func (m *GetDeploymentLogsRequest) XXX_Size() int

func (*GetDeploymentLogsRequest) XXX_Unmarshal

func (m *GetDeploymentLogsRequest) XXX_Unmarshal(b []byte) error

type MonitoringServiceClient

type MonitoringServiceClient interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error)
	// Fetch all logs of the deployment that matches the given request.
	// Required permissions:
	// - monitoring.logs.get on the deployment identified by the given deployment ID.
	GetDeploymentLogs(ctx context.Context, in *GetDeploymentLogsRequest, opts ...grpc.CallOption) (MonitoringService_GetDeploymentLogsClient, error)
}

MonitoringServiceClient is the client API for MonitoringService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMonitoringServiceClient

func NewMonitoringServiceClient(cc *grpc.ClientConn) MonitoringServiceClient

type MonitoringServiceServer

type MonitoringServiceServer interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error)
	// Fetch all logs of the deployment that matches the given request.
	// Required permissions:
	// - monitoring.logs.get on the deployment identified by the given deployment ID.
	GetDeploymentLogs(*GetDeploymentLogsRequest, MonitoringService_GetDeploymentLogsServer) error
}

MonitoringServiceServer is the server API for MonitoringService service.

type MonitoringService_GetDeploymentLogsClient

type MonitoringService_GetDeploymentLogsClient interface {
	Recv() (*DeploymentLogsChunk, error)
	grpc.ClientStream
}

type MonitoringService_GetDeploymentLogsServer

type MonitoringService_GetDeploymentLogsServer interface {
	Send(*DeploymentLogsChunk) error
	grpc.ServerStream
}

type UnimplementedMonitoringServiceServer

type UnimplementedMonitoringServiceServer struct {
}

UnimplementedMonitoringServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMonitoringServiceServer) GetAPIVersion

func (*UnimplementedMonitoringServiceServer) GetDeploymentLogs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL