Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Request
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetHostname() string
- func (x *Response) GetOutput() string
- func (x *Response) GetOutputFields() map[string]string
- func (x *Response) GetPriority() schema.Priority
- func (x *Response) GetRule() string
- func (x *Response) GetSource() string
- func (x *Response) GetSourceDeprecated() schema.Sourcedeprecated
- func (x *Response) GetTags() []string
- func (x *Response) GetTime() *timestamp.Timestamp
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type ServiceClient
- type ServiceServer
- type Service_GetClient
- type Service_GetServer
- type Service_SubClient
- type Service_SubServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
const ( Service_Sub_FullMethodName = "/diginfra.outputs.service/sub" Service_Get_FullMethodName = "/diginfra.outputs.service/get" )
Variables ¶
var File_outputs_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "diginfra.outputs.service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "sub", Handler: _Service_Sub_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "get", Handler: _Service_Get_Handler, ServerStreams: true, }, }, Metadata: "outputs.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
The `request` message is the logical representation of the request model. It is the input of the `output.service` service.
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` Priority schema.Priority `protobuf:"varint,2,opt,name=priority,proto3,enum=diginfra.schema.Priority" json:"priority,omitempty"` // Deprecated: Do not use. SourceDeprecated schema.Source `` /* 138-byte string literal not displayed */ Rule string `protobuf:"bytes,4,opt,name=rule,proto3" json:"rule,omitempty"` Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` OutputFields map[string]string `` /* 185-byte string literal not displayed */ Hostname string `protobuf:"bytes,7,opt,name=hostname,proto3" json:"hostname,omitempty"` Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` Source string `protobuf:"bytes,9,opt,name=source,proto3" json:"source,omitempty"` // contains filtered or unexported fields }
The `response` message is the representation of the output model. It contains all the elements that Diginfra emits in an output along with the definitions for priorities and source.
func (*Response) Descriptor
deprecated
func (*Response) GetHostname ¶
func (*Response) GetOutputFields ¶
func (*Response) GetPriority ¶
func (*Response) GetSourceDeprecated
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface { // Subscribe to a stream of Diginfra outputs by sending a stream of requests. Sub(ctx context.Context, opts ...grpc.CallOption) (Service_SubClient, error) // Get all the Diginfra outputs present in the system up to this call. Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (Service_GetClient, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // Subscribe to a stream of Diginfra outputs by sending a stream of requests. Sub(Service_SubServer) error // Get all the Diginfra outputs present in the system up to this call. Get(*Request, Service_GetServer) error // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Service_GetClient ¶
type Service_GetClient interface { Recv() (*Response, error) grpc.ClientStream }
type Service_GetServer ¶
type Service_GetServer interface { Send(*Response) error grpc.ServerStream }
type Service_SubClient ¶
type Service_SubServer ¶
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Get ¶
func (UnimplementedServiceServer) Get(*Request, Service_GetServer) error
func (UnimplementedServiceServer) Sub ¶
func (UnimplementedServiceServer) Sub(Service_SubServer) error
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.