notify

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package notify is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_v1alpha1_notify_notify_proto protoreflect.FileDescriptor
View Source
var Notify_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hvx.api.v1alpha1.notify.proto.Notify",
	HandlerType: (*NotifyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Subscribe",
			Handler:    _Notify_Subscribe_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/v1alpha1/notify/notify.proto",
}

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

Functions

func RegisterNotifyHandler

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

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

func RegisterNotifyHandlerClient

func RegisterNotifyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotifyClient) error

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

func RegisterNotifyHandlerFromEndpoint

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

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

func RegisterNotifyHandlerServer

func RegisterNotifyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotifyServer) error

RegisterNotifyHandlerServer registers the http handlers for service Notify to "mux". UnaryRPC :call NotifyServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNotifyHandlerFromEndpoint instead.

func RegisterNotifyServer

func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer)

Types

type NotifyClient

type NotifyClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error)
}

NotifyClient is the client API for Notify 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 NewNotifyClient

func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient

type NotifyServer

type NotifyServer interface {
	Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
}

NotifyServer is the server API for Notify service. All implementations should embed UnimplementedNotifyServer for forward compatibility

type SubscribeRequest

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

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResponse

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

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type UnimplementedNotifyServer

type UnimplementedNotifyServer struct {
}

UnimplementedNotifyServer should be embedded to have forward compatible implementations.

func (UnimplementedNotifyServer) Subscribe

type UnsafeNotifyServer

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

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

Jump to

Keyboard shortcuts

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