request

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Cancel

func (e *ServerRequest) Cancel(err types.Error, msg string) error

func (*ServerRequest) Expired

func (e *ServerRequest) Expired() bool

func (*ServerRequest) OnMessage

func (e *ServerRequest) OnMessage(ctx context.Context, msg *types.MessageBody) error

Jump to

Keyboard shortcuts

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