Documentation ¶
Index ¶
- Variables
- func RegisterEventHandlerServer(s grpc.ServiceRegistrar, srv EventHandlerServer)
- type EventHandlerClient
- type EventHandlerResponse
- func (*EventHandlerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EventHandlerResponse) GetCode() int32
- func (x *EventHandlerResponse) GetResp() string
- func (*EventHandlerResponse) ProtoMessage()
- func (x *EventHandlerResponse) ProtoReflect() protoreflect.Message
- func (x *EventHandlerResponse) Reset()
- func (x *EventHandlerResponse) String() string
- type EventHandlerServer
- type HTTPData
- func (*HTTPData) Descriptor() ([]byte, []int)deprecated
- func (x *HTTPData) GetStatus() string
- func (x *HTTPData) GetStatusCode() int32
- func (x *HTTPData) GetUserAgentUsed() string
- func (*HTTPData) ProtoMessage()
- func (x *HTTPData) ProtoReflect() protoreflect.Message
- func (x *HTTPData) Reset()
- func (x *HTTPData) String() string
- type Page
- func (*Page) Descriptor() ([]byte, []int)deprecated
- func (x *Page) GetId() string
- func (x *Page) GetNotifyUrl() string
- func (x *Page) GetPolledUrl() string
- func (x *Page) GetProduct() string
- func (*Page) ProtoMessage()
- func (x *Page) ProtoReflect() protoreflect.Message
- func (x *Page) Reset()
- func (x *Page) String() string
- type PollResult
- func (*PollResult) Descriptor() ([]byte, []int)deprecated
- func (x *PollResult) GetHttpData() *HTTPData
- func (x *PollResult) GetMessage() string
- func (x *PollResult) GetPage() *Page
- func (x *PollResult) GetResultType() PollResult_ResultType
- func (*PollResult) ProtoMessage()
- func (x *PollResult) ProtoReflect() protoreflect.Message
- func (x *PollResult) Reset()
- func (x *PollResult) String() string
- type PollResult_ResultType
- func (PollResult_ResultType) Descriptor() protoreflect.EnumDescriptor
- func (x PollResult_ResultType) Enum() *PollResult_ResultType
- func (PollResult_ResultType) EnumDescriptor() ([]byte, []int)deprecated
- func (x PollResult_ResultType) Number() protoreflect.EnumNumber
- func (x PollResult_ResultType) String() string
- func (PollResult_ResultType) Type() protoreflect.EnumType
- type UnimplementedEventHandlerServer
- type UnsafeEventHandlerServer
Constants ¶
This section is empty.
Variables ¶
var ( PollResult_ResultType_name = map[int32]string{ 0: "UNAVAILABLE", 1: "CHANGED", 2: "DEADLINE", 3: "AVAILABLE", } PollResult_ResultType_value = map[string]int32{ "UNAVAILABLE": 0, "CHANGED": 1, "DEADLINE": 2, "AVAILABLE": 3, } )
Enum value maps for PollResult_ResultType.
var File_proto_event_handler_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventHandlerServer ¶
func RegisterEventHandlerServer(s grpc.ServiceRegistrar, srv EventHandlerServer)
Types ¶
type EventHandlerClient ¶
type EventHandlerClient interface {
UpdateAvailability(ctx context.Context, in *PollResult, opts ...grpc.CallOption) (*EventHandlerResponse, error)
}
EventHandlerClient is the client API for EventHandler 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 NewEventHandlerClient ¶
func NewEventHandlerClient(cc grpc.ClientConnInterface) EventHandlerClient
type EventHandlerResponse ¶
type EventHandlerResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Resp string `protobuf:"bytes,2,opt,name=resp,proto3" json:"resp,omitempty"` // contains filtered or unexported fields }
func (*EventHandlerResponse) Descriptor
deprecated
func (*EventHandlerResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventHandlerResponse.ProtoReflect.Descriptor instead.
func (*EventHandlerResponse) GetCode ¶
func (x *EventHandlerResponse) GetCode() int32
func (*EventHandlerResponse) GetResp ¶
func (x *EventHandlerResponse) GetResp() string
func (*EventHandlerResponse) ProtoMessage ¶
func (*EventHandlerResponse) ProtoMessage()
func (*EventHandlerResponse) ProtoReflect ¶
func (x *EventHandlerResponse) ProtoReflect() protoreflect.Message
func (*EventHandlerResponse) Reset ¶
func (x *EventHandlerResponse) Reset()
func (*EventHandlerResponse) String ¶
func (x *EventHandlerResponse) String() string
type EventHandlerServer ¶
type EventHandlerServer interface { UpdateAvailability(context.Context, *PollResult) (*EventHandlerResponse, error) // contains filtered or unexported methods }
EventHandlerServer is the server API for EventHandler service. All implementations must embed UnimplementedEventHandlerServer for forward compatibility
type HTTPData ¶
type HTTPData struct { UserAgentUsed string `protobuf:"bytes,1,opt,name=UserAgentUsed,proto3" json:"UserAgentUsed,omitempty"` StatusCode int32 `protobuf:"varint,2,opt,name=StatusCode,proto3" json:"StatusCode,omitempty"` Status string `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"` // contains filtered or unexported fields }
func (*HTTPData) Descriptor
deprecated
func (*HTTPData) GetStatusCode ¶
func (*HTTPData) GetUserAgentUsed ¶
func (*HTTPData) ProtoMessage ¶
func (*HTTPData) ProtoMessage()
func (*HTTPData) ProtoReflect ¶
func (x *HTTPData) ProtoReflect() protoreflect.Message
type Page ¶
type Page struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Product string `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"` PolledUrl string `protobuf:"bytes,3,opt,name=polled_url,json=polledUrl,proto3" json:"polled_url,omitempty"` NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` // contains filtered or unexported fields }
func (*Page) Descriptor
deprecated
func (*Page) GetNotifyUrl ¶
func (*Page) GetPolledUrl ¶
func (*Page) GetProduct ¶
func (*Page) ProtoMessage ¶
func (*Page) ProtoMessage()
func (*Page) ProtoReflect ¶
func (x *Page) ProtoReflect() protoreflect.Message
type PollResult ¶
type PollResult struct { Page *Page `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` HttpData *HTTPData `protobuf:"bytes,2,opt,name=http_data,json=httpData,proto3" json:"http_data,omitempty"` ResultType PollResult_ResultType `protobuf:"varint,3,opt,name=result_type,json=resultType,proto3,enum=pb.PollResult_ResultType" json:"result_type,omitempty"` Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PollResult) Descriptor
deprecated
func (*PollResult) Descriptor() ([]byte, []int)
Deprecated: Use PollResult.ProtoReflect.Descriptor instead.
func (*PollResult) GetHttpData ¶
func (x *PollResult) GetHttpData() *HTTPData
func (*PollResult) GetMessage ¶
func (x *PollResult) GetMessage() string
func (*PollResult) GetPage ¶
func (x *PollResult) GetPage() *Page
func (*PollResult) GetResultType ¶
func (x *PollResult) GetResultType() PollResult_ResultType
func (*PollResult) ProtoMessage ¶
func (*PollResult) ProtoMessage()
func (*PollResult) ProtoReflect ¶
func (x *PollResult) ProtoReflect() protoreflect.Message
func (*PollResult) Reset ¶
func (x *PollResult) Reset()
func (*PollResult) String ¶
func (x *PollResult) String() string
type PollResult_ResultType ¶
type PollResult_ResultType int32
const ( PollResult_UNAVAILABLE PollResult_ResultType = 0 PollResult_CHANGED PollResult_ResultType = 1 PollResult_DEADLINE PollResult_ResultType = 2 PollResult_AVAILABLE PollResult_ResultType = 3 )
func (PollResult_ResultType) Descriptor ¶
func (PollResult_ResultType) Descriptor() protoreflect.EnumDescriptor
func (PollResult_ResultType) Enum ¶
func (x PollResult_ResultType) Enum() *PollResult_ResultType
func (PollResult_ResultType) EnumDescriptor
deprecated
func (PollResult_ResultType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PollResult_ResultType.Descriptor instead.
func (PollResult_ResultType) Number ¶
func (x PollResult_ResultType) Number() protoreflect.EnumNumber
func (PollResult_ResultType) String ¶
func (x PollResult_ResultType) String() string
func (PollResult_ResultType) Type ¶
func (PollResult_ResultType) Type() protoreflect.EnumType
type UnimplementedEventHandlerServer ¶
type UnimplementedEventHandlerServer struct { }
UnimplementedEventHandlerServer must be embedded to have forward compatible implementations.
func (UnimplementedEventHandlerServer) UpdateAvailability ¶
func (UnimplementedEventHandlerServer) UpdateAvailability(context.Context, *PollResult) (*EventHandlerResponse, error)
type UnsafeEventHandlerServer ¶
type UnsafeEventHandlerServer interface {
// contains filtered or unexported methods
}
UnsafeEventHandlerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventHandlerServer will result in compilation errors.