Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeliverServer ¶
type DeliverServer struct { DeliverSupport PolicyChecker Send func(msg proto.Message) error }
DeliverServer a polymorphic structure to support generalization of this handler to be able to deliver different type of responses
func NewDeliverServer ¶
func NewDeliverServer(support DeliverSupport, policyChecker PolicyChecker, send func(msg proto.Message) error) *DeliverServer
NewDeliverServer constructing deliver
type DeliverSupport ¶
type DeliverSupport interface { Recv() (*cb.Envelope, error) Context() context.Context CreateStatusReply(status cb.Status) proto.Message CreateBlockReply(block *cb.Block) proto.Message }
DeliverSupport defines the interface a handler must implement for delivery services
type Handler ¶
type Handler interface {
Handle(srv *DeliverServer) error
}
Handler defines an interface which handles Deliver requests
type PolicyChecker ¶
PolicyChecker checks the envelope against the policy logic supplied by the function
type Support ¶
type Support interface { // Sequence returns the current config sequence number, can be used to detect config changes Sequence() uint64 // PolicyManager returns the current policy manager as specified by the chain configuration PolicyManager() policies.Manager // Reader returns the chain Reader for the chain Reader() blockledger.Reader // Errored returns a channel which closes when the backing consenter has errored Errored() <-chan struct{} }
Support provides the backing resources needed to support deliver on a chain
Click to show internal directories.
Click to hide internal directories.