rpc

package
v0.32.13 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Events_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpc.Events",
	HandlerType: (*EventsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NoticeEvent",
			Handler:    _Events_NoticeEvent_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeEvents",
			Handler:       _Events_SubscribeEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "rpc/rpc.proto",
}

Events_ServiceDesc is the grpc.ServiceDesc for Events service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_rpc_rpc_proto protoreflect.FileDescriptor

Functions

func RegisterEventsServer added in v0.32.0

func RegisterEventsServer(s grpc.ServiceRegistrar, srv EventsServer)

Types

type Empty added in v0.32.0

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

func (*Empty) Descriptor deprecated added in v0.32.0

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage added in v0.32.0

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.32.0

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

func (*Empty) Reset added in v0.32.0

func (x *Empty) Reset()

func (*Empty) String added in v0.32.0

func (x *Empty) String() string

type Event added in v0.32.0

type Event struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated added in v0.32.0

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetName added in v0.32.0

func (x *Event) GetName() string

func (*Event) GetPayload added in v0.32.0

func (x *Event) GetPayload() []byte

func (*Event) ProtoMessage added in v0.32.0

func (*Event) ProtoMessage()

func (*Event) ProtoReflect added in v0.32.0

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

func (*Event) Reset added in v0.32.0

func (x *Event) Reset()

func (*Event) String added in v0.32.0

func (x *Event) String() string

type EventResponse added in v0.32.0

type EventResponse struct {
	Errors  bool   `protobuf:"varint,1,opt,name=errors,proto3" json:"errors,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EventResponse) Descriptor deprecated added in v0.32.0

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

Deprecated: Use EventResponse.ProtoReflect.Descriptor instead.

func (*EventResponse) GetErrors added in v0.32.0

func (x *EventResponse) GetErrors() bool

func (*EventResponse) GetMessage added in v0.32.0

func (x *EventResponse) GetMessage() string

func (*EventResponse) ProtoMessage added in v0.32.0

func (*EventResponse) ProtoMessage()

func (*EventResponse) ProtoReflect added in v0.32.0

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

func (*EventResponse) Reset added in v0.32.0

func (x *EventResponse) Reset()

func (*EventResponse) String added in v0.32.0

func (x *EventResponse) String() string

type EventSub added in v0.32.0

type EventSub struct {
	EventNames []string `protobuf:"bytes,1,rep,name=event_names,json=eventNames,proto3" json:"event_names,omitempty"`
	// contains filtered or unexported fields
}

func (*EventSub) Descriptor deprecated added in v0.32.0

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

Deprecated: Use EventSub.ProtoReflect.Descriptor instead.

func (*EventSub) GetEventNames added in v0.32.0

func (x *EventSub) GetEventNames() []string

func (*EventSub) ProtoMessage added in v0.32.0

func (*EventSub) ProtoMessage()

func (*EventSub) ProtoReflect added in v0.32.0

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

func (*EventSub) Reset added in v0.32.0

func (x *EventSub) Reset()

func (*EventSub) String added in v0.32.0

func (x *EventSub) String() string

type EventsClient added in v0.32.0

type EventsClient interface {
	NoticeEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventResponse, error)
	SubscribeEvents(ctx context.Context, in *EventSub, opts ...grpc.CallOption) (Events_SubscribeEventsClient, error)
}

EventsClient is the client API for Events 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 NewEventsClient added in v0.32.0

func NewEventsClient(cc grpc.ClientConnInterface) EventsClient

type EventsServer added in v0.32.0

type EventsServer interface {
	NoticeEvent(context.Context, *Event) (*EventResponse, error)
	SubscribeEvents(*EventSub, Events_SubscribeEventsServer) error
	// contains filtered or unexported methods
}

EventsServer is the server API for Events service. All implementations must embed UnimplementedEventsServer for forward compatibility

type Events_SubscribeEventsClient added in v0.32.0

type Events_SubscribeEventsClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type Events_SubscribeEventsServer added in v0.32.0

type Events_SubscribeEventsServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type MACObservation added in v0.32.0

type MACObservation struct {
	Mac        string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"`
	Ip         string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	SourceHost string `protobuf:"bytes,3,opt,name=source_host,json=sourceHost,proto3" json:"source_host,omitempty"`
	// contains filtered or unexported fields
}

func (*MACObservation) Descriptor deprecated added in v0.32.0

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

Deprecated: Use MACObservation.ProtoReflect.Descriptor instead.

func (*MACObservation) GetIp added in v0.32.0

func (x *MACObservation) GetIp() string

func (*MACObservation) GetMac added in v0.32.0

func (x *MACObservation) GetMac() string

func (*MACObservation) GetSourceHost added in v0.32.0

func (x *MACObservation) GetSourceHost() string

func (*MACObservation) ProtoMessage added in v0.32.0

func (*MACObservation) ProtoMessage()

func (*MACObservation) ProtoReflect added in v0.32.0

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

func (*MACObservation) Reset added in v0.32.0

func (x *MACObservation) Reset()

func (*MACObservation) String added in v0.32.0

func (x *MACObservation) String() string

type UnimplementedEventsServer added in v0.32.0

type UnimplementedEventsServer struct {
}

UnimplementedEventsServer must be embedded to have forward compatible implementations.

func (UnimplementedEventsServer) NoticeEvent added in v0.32.0

func (UnimplementedEventsServer) SubscribeEvents added in v0.32.0

type UnsafeEventsServer added in v0.32.0

type UnsafeEventsServer interface {
	// contains filtered or unexported methods
}

UnsafeEventsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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