The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/p2p/stream/common/requestmanager/interface.go

25 lines
626 B

package requestmanager
import (
"context"
sttypes "github.com/harmony-one/harmony/p2p/stream/types"
p2ptypes "github.com/harmony-one/harmony/p2p/types"
)
// Requester is the interface to do request
type Requester interface {
DoRequest(ctx context.Context, request sttypes.Request, options ...RequestOption) (sttypes.Response, sttypes.StreamID, error)
}
// Deliverer is the interface to deliver a response
type Deliverer interface {
DeliverResponse(stID sttypes.StreamID, resp sttypes.Response)
}
// RequestManager manages over the requests
type RequestManager interface {
p2ptypes.LifeCycle
Requester
Deliverer
}