Documentation
¶
Index ¶
- Constants
- Variables
- func LoadCertificates(localCert, localKey, caCert string) ([]tls.Certificate, *x509.CertPool, error)
- func RegisterGoPlumServer(s grpc.ServiceRegistrar, srv GoPlumServer)
- type Check
- func (*Check) Descriptor() ([]byte, []int)deprecated
- func (x *Check) GetLastRun() int64
- func (x *Check) GetName() string
- func (x *Check) GetSettled() bool
- func (x *Check) GetState() Status
- func (x *Check) GetSuspended() bool
- func (x *Check) GetType() string
- func (*Check) ProtoMessage()
- func (x *Check) ProtoReflect() protoreflect.Message
- func (x *Check) Reset()
- func (x *Check) String() string
- type CheckList
- type CheckName
- type Empty
- type Fact
- func (*Fact) Descriptor() ([]byte, []int)deprecated
- func (x *Fact) GetInt() int64
- func (x *Fact) GetName() string
- func (x *Fact) GetStr() string
- func (x *Fact) GetValue() isFact_Value
- func (*Fact) ProtoMessage()
- func (x *Fact) ProtoReflect() protoreflect.Message
- func (x *Fact) Reset()
- func (x *Fact) String() string
- type FactValue
- type Fact_Int
- type Fact_Str
- type GoPlumClient
- type GoPlumServer
- type GoPlum_ResultsClient
- type GoPlum_ResultsServer
- type Result
- func (*Result) Descriptor() ([]byte, []int)deprecated
- func (x *Result) GetCheck() string
- func (x *Result) GetDetail() string
- func (x *Result) GetFacts() []*Fact
- func (x *Result) GetResult() Status
- func (x *Result) GetTime() int64
- func (*Result) ProtoMessage()
- func (x *Result) ProtoReflect() protoreflect.Message
- func (x *Result) Reset()
- func (x *Result) String() string
- type Status
- type UnimplementedGoPlumServer
- func (UnimplementedGoPlumServer) GetCheck(context.Context, *CheckName) (*Check, error)
- func (UnimplementedGoPlumServer) GetChecks(context.Context, *Empty) (*CheckList, error)
- func (UnimplementedGoPlumServer) Results(*Empty, grpc.ServerStreamingServer[Result]) error
- func (UnimplementedGoPlumServer) ResumeCheck(context.Context, *CheckName) (*Check, error)
- func (UnimplementedGoPlumServer) SuspendCheck(context.Context, *CheckName) (*Check, error)
- type UnsafeGoPlumServer
Constants ¶
const ( GoPlum_Results_FullMethodName = "/api.GoPlum/Results" GoPlum_GetChecks_FullMethodName = "/api.GoPlum/GetChecks" GoPlum_GetCheck_FullMethodName = "/api.GoPlum/GetCheck" GoPlum_SuspendCheck_FullMethodName = "/api.GoPlum/SuspendCheck" GoPlum_ResumeCheck_FullMethodName = "/api.GoPlum/ResumeCheck" )
Variables ¶
var ( Status_name = map[int32]string{ 0: "INDETERMINATE", 1: "GOOD", 2: "FAILING", } Status_value = map[string]int32{ "INDETERMINATE": 0, "GOOD": 1, "FAILING": 2, } )
Enum value maps for Status.
var File_goplum_proto protoreflect.FileDescriptor
var GoPlum_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.GoPlum", HandlerType: (*GoPlumServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetChecks", Handler: _GoPlum_GetChecks_Handler, }, { MethodName: "GetCheck", Handler: _GoPlum_GetCheck_Handler, }, { MethodName: "SuspendCheck", Handler: _GoPlum_SuspendCheck_Handler, }, { MethodName: "ResumeCheck", Handler: _GoPlum_ResumeCheck_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Results", Handler: _GoPlum_Results_Handler, ServerStreams: true, }, }, Metadata: "goplum.proto", }
GoPlum_ServiceDesc is the grpc.ServiceDesc for GoPlum service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func LoadCertificates ¶
func RegisterGoPlumServer ¶
func RegisterGoPlumServer(s grpc.ServiceRegistrar, srv GoPlumServer)
Types ¶
type Check ¶
type Check struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
LastRun int64 `protobuf:"varint,3,opt,name=last_run,json=lastRun,proto3" json:"last_run,omitempty"`
Settled bool `protobuf:"varint,4,opt,name=settled,proto3" json:"settled,omitempty"`
State Status `protobuf:"varint,5,opt,name=state,proto3,enum=api.Status" json:"state,omitempty"`
Suspended bool `protobuf:"varint,6,opt,name=suspended,proto3" json:"suspended,omitempty"`
// contains filtered or unexported fields
}
func (*Check) Descriptor
deprecated
func (*Check) GetLastRun ¶
func (*Check) GetSettled ¶
func (*Check) GetSuspended ¶
func (*Check) ProtoMessage ¶
func (*Check) ProtoMessage()
func (*Check) ProtoReflect ¶
func (x *Check) ProtoReflect() protoreflect.Message
type CheckList ¶
type CheckList struct {
Checks []*Check `protobuf:"bytes,1,rep,name=checks,proto3" json:"checks,omitempty"`
// contains filtered or unexported fields
}
func (*CheckList) Descriptor
deprecated
func (*CheckList) ProtoMessage ¶
func (*CheckList) ProtoMessage()
func (*CheckList) ProtoReflect ¶
func (x *CheckList) ProtoReflect() protoreflect.Message
type CheckName ¶
type CheckName struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*CheckName) Descriptor
deprecated
func (*CheckName) ProtoMessage ¶
func (*CheckName) ProtoMessage()
func (*CheckName) ProtoReflect ¶
func (x *CheckName) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Fact ¶ added in v0.6.0
type Fact struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Types that are valid to be assigned to Value:
//
// *Fact_Int
// *Fact_Str
Value isFact_Value `protobuf_oneof:"value"`
// contains filtered or unexported fields
}
func (*Fact) Descriptor
deprecated
added in
v0.6.0
func (*Fact) ProtoMessage ¶ added in v0.6.0
func (*Fact) ProtoMessage()
func (*Fact) ProtoReflect ¶ added in v0.6.0
func (x *Fact) ProtoReflect() protoreflect.Message
type Fact_Int ¶ added in v0.6.0
type Fact_Int struct {
Int int64 `protobuf:"varint,2,opt,name=int,proto3,oneof"`
}
type Fact_Str ¶ added in v0.6.0
type Fact_Str struct {
Str string `protobuf:"bytes,3,opt,name=str,proto3,oneof"`
}
type GoPlumClient ¶
type GoPlumClient interface {
Results(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Result], error)
GetChecks(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CheckList, error)
GetCheck(ctx context.Context, in *CheckName, opts ...grpc.CallOption) (*Check, error)
SuspendCheck(ctx context.Context, in *CheckName, opts ...grpc.CallOption) (*Check, error)
ResumeCheck(ctx context.Context, in *CheckName, opts ...grpc.CallOption) (*Check, error)
}
GoPlumClient is the client API for GoPlum service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGoPlumClient ¶
func NewGoPlumClient(cc grpc.ClientConnInterface) GoPlumClient
type GoPlumServer ¶
type GoPlumServer interface {
Results(*Empty, grpc.ServerStreamingServer[Result]) error
GetChecks(context.Context, *Empty) (*CheckList, error)
GetCheck(context.Context, *CheckName) (*Check, error)
SuspendCheck(context.Context, *CheckName) (*Check, error)
ResumeCheck(context.Context, *CheckName) (*Check, error)
// contains filtered or unexported methods
}
GoPlumServer is the server API for GoPlum service. All implementations must embed UnimplementedGoPlumServer for forward compatibility.
type GoPlum_ResultsClient ¶
type GoPlum_ResultsClient = grpc.ServerStreamingClient[Result]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GoPlum_ResultsServer ¶
type GoPlum_ResultsServer = grpc.ServerStreamingServer[Result]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Result ¶
type Result struct {
Check string `protobuf:"bytes,1,opt,name=check,proto3" json:"check,omitempty"`
Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
Result Status `protobuf:"varint,3,opt,name=result,proto3,enum=api.Status" json:"result,omitempty"`
Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"`
Facts []*Fact `protobuf:"bytes,5,rep,name=facts,proto3" json:"facts,omitempty"`
// contains filtered or unexported fields
}
func (*Result) Descriptor
deprecated
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedGoPlumServer ¶
type UnimplementedGoPlumServer struct{}
UnimplementedGoPlumServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedGoPlumServer) Results ¶
func (UnimplementedGoPlumServer) Results(*Empty, grpc.ServerStreamingServer[Result]) error
func (UnimplementedGoPlumServer) ResumeCheck ¶
func (UnimplementedGoPlumServer) SuspendCheck ¶
type UnsafeGoPlumServer ¶ added in v0.8.0
type UnsafeGoPlumServer interface {
// contains filtered or unexported methods
}
UnsafeGoPlumServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GoPlumServer will result in compilation errors.