Documentation ¶
Overview ¶
Package event_feed is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterEventFeedHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventFeedHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventFeedClient) error
- func RegisterEventFeedHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventFeedServer(s *grpc.Server, srv EventFeedServer)
- type EventFeedClient
- type EventFeedServer
- type EventFeedServerMock
- func (m *EventFeedServerMock) GetEventFeed(ctx context.Context, req *request.EventFilter) (*response.Events, error)
- func (m *EventFeedServerMock) GetEventStringBuckets(ctx context.Context, req *request.EventStrings) (*response.EventStrings, error)
- func (m *EventFeedServerMock) GetEventTaskCounts(ctx context.Context, req *request.EventCountsFilter) (*response.EventCounts, error)
- func (m *EventFeedServerMock) GetEventTypeCounts(ctx context.Context, req *request.EventCountsFilter) (*response.EventCounts, error)
- func (m *EventFeedServerMock) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEventFeedHandler ¶
func RegisterEventFeedHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventFeedHandler registers the http handlers for service EventFeed to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventFeedHandlerClient ¶
func RegisterEventFeedHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventFeedClient) error
RegisterEventFeedHandlerClient registers the http handlers for service EventFeed to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventFeedClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventFeedClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventFeedClient" to call the correct interceptors.
func RegisterEventFeedHandlerFromEndpoint ¶
func RegisterEventFeedHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventFeedHandlerFromEndpoint is same as RegisterEventFeedHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventFeedServer ¶
func RegisterEventFeedServer(s *grpc.Server, srv EventFeedServer)
Types ¶
type EventFeedClient ¶
type EventFeedClient interface { GetEventFeed(ctx context.Context, in *request.EventFilter, opts ...grpc.CallOption) (*response.Events, error) GetEventTypeCounts(ctx context.Context, in *request.EventCountsFilter, opts ...grpc.CallOption) (*response.EventCounts, error) GetEventTaskCounts(ctx context.Context, in *request.EventCountsFilter, opts ...grpc.CallOption) (*response.EventCounts, error) GetEventStringBuckets(ctx context.Context, in *request.EventStrings, opts ...grpc.CallOption) (*response.EventStrings, error) }
EventFeedClient is the client API for EventFeed service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventFeedClient ¶
func NewEventFeedClient(cc *grpc.ClientConn) EventFeedClient
type EventFeedServer ¶
type EventFeedServer interface { GetEventFeed(context.Context, *request.EventFilter) (*response.Events, error) GetEventTypeCounts(context.Context, *request.EventCountsFilter) (*response.EventCounts, error) GetEventTaskCounts(context.Context, *request.EventCountsFilter) (*response.EventCounts, error) GetEventStringBuckets(context.Context, *request.EventStrings) (*response.EventStrings, error) }
EventFeedServer is the server API for EventFeed service.
type EventFeedServerMock ¶
type EventFeedServerMock struct { GetEventFeedFunc func(context.Context, *request.EventFilter) (*response.Events, error) GetEventTypeCountsFunc func(context.Context, *request.EventCountsFilter) (*response.EventCounts, error) GetEventTaskCountsFunc func(context.Context, *request.EventCountsFilter) (*response.EventCounts, error) GetEventStringBucketsFunc func(context.Context, *request.EventStrings) (*response.EventStrings, error) // contains filtered or unexported fields }
EventFeedServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns
func NewEventFeedServerMock ¶
func NewEventFeedServerMock() *EventFeedServerMock
NewEventFeedServerMock gives you a fresh instance of EventFeedServerMock.
func NewEventFeedServerMockWithoutValidation ¶
func NewEventFeedServerMockWithoutValidation() *EventFeedServerMock
NewEventFeedServerMockWithoutValidation gives you a fresh instance of EventFeedServerMock which does not attempt to validate requests before passing them to their respective '*Func'.
func (*EventFeedServerMock) GetEventFeed ¶
func (m *EventFeedServerMock) GetEventFeed(ctx context.Context, req *request.EventFilter) (*response.Events, error)
func (*EventFeedServerMock) GetEventStringBuckets ¶
func (m *EventFeedServerMock) GetEventStringBuckets(ctx context.Context, req *request.EventStrings) (*response.EventStrings, error)
func (*EventFeedServerMock) GetEventTaskCounts ¶
func (m *EventFeedServerMock) GetEventTaskCounts(ctx context.Context, req *request.EventCountsFilter) (*response.EventCounts, error)
func (*EventFeedServerMock) GetEventTypeCounts ¶
func (m *EventFeedServerMock) GetEventTypeCounts(ctx context.Context, req *request.EventCountsFilter) (*response.EventCounts, error)
func (*EventFeedServerMock) Reset ¶
func (m *EventFeedServerMock) Reset()
Reset resets all overridden functions