mirror of
https://github.com/luxfi/warp.git
synced 2026-10-30 15:13:04 +00:00
Remove Warp prefix from method names since package already provides context: - SendWarpRequest -> SendRequest - SendWarpResponse -> SendResponse - SendWarpError -> SendError - SendWarpGossip -> SendGossip - WarpRequest -> Request - WarpResponse -> Response - WarpGossip -> Gossip - WarpRequestFailed -> RequestFailed Add interface compliance check for FakeSender.
34 lines
755 B
Go
34 lines
755 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package warp
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/luxfi/ids"
|
|
"github.com/luxfi/math/set"
|
|
)
|
|
|
|
// FakeSender is a test implementation of Sender that does nothing.
|
|
type FakeSender struct{}
|
|
|
|
// Interface compliance check
|
|
var _ Sender = FakeSender{}
|
|
|
|
func (FakeSender) SendRequest(context.Context, set.Set[ids.NodeID], uint32, []byte) error {
|
|
return nil
|
|
}
|
|
|
|
func (FakeSender) SendResponse(context.Context, ids.NodeID, uint32, []byte) error {
|
|
return nil
|
|
}
|
|
|
|
func (FakeSender) SendError(context.Context, ids.NodeID, uint32, int32, string) error {
|
|
return nil
|
|
}
|
|
|
|
func (FakeSender) SendGossip(context.Context, SendConfig, []byte) error {
|
|
return nil
|
|
}
|