events

package
v0.6.14 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package events is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterChaincodeEventHandler

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

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

func RegisterChaincodeEventHandlerClient

func RegisterChaincodeEventHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChaincodeEventClient) error

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

func RegisterChaincodeEventHandlerFromEndpoint

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

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

func RegisterChaincodeEventServer

func RegisterChaincodeEventServer(s *grpc.Server, srv ChaincodeEventServer)

Types

type ChaincodeEventClient

type ChaincodeEventClient interface {
	EventStream(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (ChaincodeEvent_EventStreamClient, error)
}

ChaincodeEventClient is the client API for ChaincodeEvent service.

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

func NewChaincodeEventClient

func NewChaincodeEventClient(cc *grpc.ClientConn) ChaincodeEventClient

type ChaincodeEventGateway

type ChaincodeEventGateway struct {
	gateway.Chaincode
}

func (*ChaincodeEventGateway) ApiDef

ApiDef returns service definition

func (*ChaincodeEventGateway) EventStream

type ChaincodeEventServer

type ChaincodeEventServer interface {
	EventStream(*empty.Empty, ChaincodeEvent_EventStreamServer) error
}

ChaincodeEventServer is the server API for ChaincodeEvent service.

type ChaincodeEvent_EventStreamClient

type ChaincodeEvent_EventStreamClient interface {
	Recv() (*peer.ChaincodeEvent, error)
	grpc.ClientStream
}

type ChaincodeEvent_EventStreamServer

type ChaincodeEvent_EventStreamServer interface {
	Send(*peer.ChaincodeEvent) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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