Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientRequest ¶
type ClientRequest struct {
// contains filtered or unexported fields
}
func NewClientRequest ¶
func NewClientRequest(ctx context.Context, lggr logger.Logger, req commoncap.CapabilityRequest, messageID string, remoteCapabilityInfo commoncap.CapabilityInfo, localDonInfo capabilities.DON, dispatcher types.Dispatcher, requestTimeout time.Duration) (*ClientRequest, error)
func (*ClientRequest) Cancel ¶
func (c *ClientRequest) Cancel(err error)
func (*ClientRequest) Expired ¶
func (c *ClientRequest) Expired() bool
func (*ClientRequest) OnMessage ¶
func (c *ClientRequest) OnMessage(_ context.Context, msg *types.MessageBody) error
TODO OnMessage assumes that only one response is received from each peer, if streaming responses need to be supported this will need to be updated
func (*ClientRequest) ResponseChan ¶
func (c *ClientRequest) ResponseChan() <-chan commoncap.CapabilityResponse
type ServerRequest ¶
type ServerRequest struct {
// contains filtered or unexported fields
}
func NewServerRequest ¶
func NewServerRequest(capability capabilities.TargetCapability, capabilityID string, capabilityDonID uint32, capabilityPeerId p2ptypes.PeerID, callingDon commoncap.DON, requestMessageID string, dispatcher types.Dispatcher, requestTimeout time.Duration, lggr logger.Logger) *ServerRequest
func (*ServerRequest) Expired ¶
func (e *ServerRequest) Expired() bool
func (*ServerRequest) OnMessage ¶
func (e *ServerRequest) OnMessage(ctx context.Context, msg *types.MessageBody) error
Click to show internal directories.
Click to hide internal directories.