api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_goplum_proto protoreflect.FileDescriptor
View Source
var (
	ServiceDesc = &_GoPlum_serviceDesc
)

Functions

func LoadCertificates

func LoadCertificates(localCert, localKey, caCert string) ([]tls.Certificate, *x509.CertPool, error)

func RegisterGoPlumServer

func RegisterGoPlumServer(s *grpc.Server, 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) Descriptor() ([]byte, []int)

Deprecated: Use Check.ProtoReflect.Descriptor instead.

func (*Check) GetLastRun

func (x *Check) GetLastRun() int64

func (*Check) GetName

func (x *Check) GetName() string

func (*Check) GetSettled

func (x *Check) GetSettled() bool

func (*Check) GetState

func (x *Check) GetState() Status

func (*Check) GetSuspended

func (x *Check) GetSuspended() bool

func (*Check) GetType

func (x *Check) GetType() string

func (*Check) ProtoMessage

func (*Check) ProtoMessage()

func (*Check) ProtoReflect

func (x *Check) ProtoReflect() protoreflect.Message

func (*Check) Reset

func (x *Check) Reset()

func (*Check) String

func (x *Check) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use CheckList.ProtoReflect.Descriptor instead.

func (*CheckList) GetChecks

func (x *CheckList) GetChecks() []*Check

func (*CheckList) ProtoMessage

func (*CheckList) ProtoMessage()

func (*CheckList) ProtoReflect

func (x *CheckList) ProtoReflect() protoreflect.Message

func (*CheckList) Reset

func (x *CheckList) Reset()

func (*CheckList) String

func (x *CheckList) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use CheckName.ProtoReflect.Descriptor instead.

func (*CheckName) GetName

func (x *CheckName) GetName() string

func (*CheckName) ProtoMessage

func (*CheckName) ProtoMessage()

func (*CheckName) ProtoReflect

func (x *CheckName) ProtoReflect() protoreflect.Message

func (*CheckName) Reset

func (x *CheckName) Reset()

func (*CheckName) String

func (x *CheckName) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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 assignable 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) Descriptor() ([]byte, []int)

Deprecated: Use Fact.ProtoReflect.Descriptor instead.

func (*Fact) GetInt added in v0.6.0

func (x *Fact) GetInt() int64

func (*Fact) GetName added in v0.6.0

func (x *Fact) GetName() string

func (*Fact) GetStr added in v0.6.0

func (x *Fact) GetStr() string

func (*Fact) GetValue added in v0.6.0

func (m *Fact) GetValue() isFact_Value

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

func (*Fact) Reset added in v0.6.0

func (x *Fact) Reset()

func (*Fact) String added in v0.6.0

func (x *Fact) String() string

type FactValue added in v0.6.0

type FactValue = isFact_Value

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) (GoPlum_ResultsClient, 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGoPlumClient

func NewGoPlumClient(cc grpc.ClientConnInterface) GoPlumClient

type GoPlumServer

type GoPlumServer interface {
	Results(*Empty, GoPlum_ResultsServer) 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)
}

GoPlumServer is the server API for GoPlum service.

type GoPlum_ResultsClient

type GoPlum_ResultsClient interface {
	Recv() (*Result, error)
	grpc.ClientStream
}

type GoPlum_ResultsServer

type GoPlum_ResultsServer interface {
	Send(*Result) error
	grpc.ServerStream
}

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) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCheck

func (x *Result) GetCheck() string

func (*Result) GetDetail

func (x *Result) GetDetail() string

func (*Result) GetFacts added in v0.6.0

func (x *Result) GetFacts() []*Fact

func (*Result) GetResult

func (x *Result) GetResult() Status

func (*Result) GetTime

func (x *Result) GetTime() int64

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type Status

type Status int32
const (
	Status_INDETERMINATE Status = 0
	Status_GOOD          Status = 1
	Status_FAILING       Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedGoPlumServer

type UnimplementedGoPlumServer struct {
}

UnimplementedGoPlumServer can be embedded to have forward compatible implementations.

func (*UnimplementedGoPlumServer) GetCheck

func (*UnimplementedGoPlumServer) GetChecks

func (*UnimplementedGoPlumServer) Results

func (*UnimplementedGoPlumServer) ResumeCheck

func (*UnimplementedGoPlumServer) SuspendCheck

Jump to

Keyboard shortcuts

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