notificationpb

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package notificationpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNotificationDummyServiceHandler

func RegisterNotificationDummyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNotificationDummyServiceHandler registers the http handlers for service NotificationDummyService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNotificationDummyServiceHandlerClient

func RegisterNotificationDummyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotificationDummyServiceClient) error

RegisterNotificationDummyServiceHandlerClient registers the http handlers for service NotificationDummyService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NotificationDummyServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NotificationDummyServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NotificationDummyServiceClient" to call the correct interceptors.

func RegisterNotificationDummyServiceHandlerFromEndpoint

func RegisterNotificationDummyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNotificationDummyServiceHandlerFromEndpoint is same as RegisterNotificationDummyServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNotificationDummyServiceServer

func RegisterNotificationDummyServiceServer(s *grpc.Server, srv NotificationDummyServiceServer)

Types

type NotificationDummyServiceClient

type NotificationDummyServiceClient interface {
	Notify(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*notification.NotificationMessage, error)
}

NotificationDummyServiceClient is the client API for NotificationDummyService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNotificationDummyServiceClient

func NewNotificationDummyServiceClient(cc *grpc.ClientConn) NotificationDummyServiceClient

type NotificationDummyServiceServer

type NotificationDummyServiceServer interface {
	Notify(context.Context, *empty.Empty) (*notification.NotificationMessage, error)
}

NotificationDummyServiceServer is the server API for NotificationDummyService service.

Jump to

Keyboard shortcuts

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