Documentation ¶
Index ¶
- Variables
- func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetAction() string
- func (x *Event) GetId() string
- func (x *Event) GetOpts() map[string]string
- func (x *Event) GetSubject() string
- func (x *Event) GetValue() []byte
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventList
- type EventServiceClient
- type EventServiceServer
- type HealthReply
- func (*HealthReply) Descriptor() ([]byte, []int)deprecated
- func (x *HealthReply) GetLocalTimestamp() int64
- func (x *HealthReply) GetStatus() string
- func (*HealthReply) ProtoMessage()
- func (x *HealthReply) ProtoReflect() protoreflect.Message
- func (x *HealthReply) Reset()
- func (x *HealthReply) String() string
- type HealthRequest
- type Result
- type Results
- type UnimplementedEventServiceServer
- type UnsafeEventServiceServer
Constants ¶
This section is empty.
Variables ¶
var EventService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.sync.v1.EventService", HandlerType: (*EventServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Sync", Handler: _EventService_Sync_Handler, }, { MethodName: "Health", Handler: _EventService_Health_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "event_service.proto", }
EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_event_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventServiceServer ¶
func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
Types ¶
type Event ¶
type Event struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //entity id Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` //create, delete, update Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` //a entity name such as account, role, service, instance Opts map[string]string `` //metadata or options /* 149-byte string literal not displayed */ Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` // the entity // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetSubject ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventList ¶
type EventList struct { Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
func (*EventList) Descriptor
deprecated
func (*EventList) ProtoMessage ¶
func (*EventList) ProtoMessage()
func (*EventList) ProtoReflect ¶
func (x *EventList) ProtoReflect() protoreflect.Message
type EventServiceClient ¶
type EventServiceClient interface { Sync(ctx context.Context, in *EventList, opts ...grpc.CallOption) (*Results, error) Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthReply, error) }
EventServiceClient is the client API for EventService 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 NewEventServiceClient ¶
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient
type EventServiceServer ¶
type EventServiceServer interface { Sync(context.Context, *EventList) (*Results, error) Health(context.Context, *HealthRequest) (*HealthReply, error) // contains filtered or unexported methods }
EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility
type HealthReply ¶
type HealthReply struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` LocalTimestamp int64 `protobuf:"varint,2,opt,name=local_timestamp,json=localTimestamp,proto3" json:"local_timestamp,omitempty"` // contains filtered or unexported fields }
func (*HealthReply) Descriptor
deprecated
func (*HealthReply) Descriptor() ([]byte, []int)
Deprecated: Use HealthReply.ProtoReflect.Descriptor instead.
func (*HealthReply) GetLocalTimestamp ¶
func (x *HealthReply) GetLocalTimestamp() int64
func (*HealthReply) GetStatus ¶
func (x *HealthReply) GetStatus() string
func (*HealthReply) ProtoMessage ¶
func (*HealthReply) ProtoMessage()
func (*HealthReply) ProtoReflect ¶
func (x *HealthReply) ProtoReflect() protoreflect.Message
func (*HealthReply) Reset ¶
func (x *HealthReply) Reset()
func (*HealthReply) String ¶
func (x *HealthReply) String() string
type HealthRequest ¶
type HealthRequest struct {
// contains filtered or unexported fields
}
func (*HealthRequest) Descriptor
deprecated
func (*HealthRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.
func (*HealthRequest) ProtoMessage ¶
func (*HealthRequest) ProtoMessage()
func (*HealthRequest) ProtoReflect ¶
func (x *HealthRequest) ProtoReflect() protoreflect.Message
func (*HealthRequest) Reset ¶
func (x *HealthRequest) Reset()
func (*HealthRequest) String ¶
func (x *HealthRequest) String() string
type Result ¶
type Result struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //reuse standard http code Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Result) Descriptor
deprecated
func (*Result) GetMessage ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type Results ¶
type Results struct { Results map[string]*Result `` //id to result /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Results) Descriptor
deprecated
func (*Results) GetResults ¶
func (*Results) ProtoMessage ¶
func (*Results) ProtoMessage()
func (*Results) ProtoReflect ¶
func (x *Results) ProtoReflect() protoreflect.Message
type UnimplementedEventServiceServer ¶
type UnimplementedEventServiceServer struct { }
UnimplementedEventServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEventServiceServer) Health ¶
func (UnimplementedEventServiceServer) Health(context.Context, *HealthRequest) (*HealthReply, error)
type UnsafeEventServiceServer ¶
type UnsafeEventServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventServiceServer will result in compilation errors.