Documentation ¶
Index ¶
- func ListenMockServer(mockServer pb.StreamServiceServer, ipAddress string) (*grpc.Server, net.Listener)
- func MockStoreKey(key bifrost.Key, keyDirPath string) error
- func NewMockConnection(targetIP string) (bifrost.Connection, error)
- func NewMockCrypto() bifrost.Crypto
- func NewMockKeyOpts() bifrost.KeyOpts
- func NewMockKeyPair() (pri bifrost.Key, pub bifrost.Key, err error)
- func NewMockServer() *server.Server
- type CloseCallBack
- type MockCloseHandler
- type MockConnectionHandler
- type MockECDSAKeyRecoverer
- type MockECDSASigner
- type MockECDSAVerifier
- type MockHandler
- type MockPriKey
- type MockPubKey
- type MockRecvHandler
- type MockServer
- type MockStreamServer
- func (MockStreamServer) Context() context.Context
- func (s *MockStreamServer) Recv() (*pb.Envelope, error)
- func (MockStreamServer) RecvMsg(m interface{}) error
- func (s *MockStreamServer) Send(envelope *pb.Envelope) error
- func (MockStreamServer) SendHeader(metadata.MD) error
- func (MockStreamServer) SendMsg(m interface{}) error
- func (MockStreamServer) SetHeader(metadata.MD) error
- func (MockStreamServer) SetTrailer(metadata.MD)
- type MockStreamWrapper
- type MockvalueCtx
- type SendCallBack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenMockServer ¶
func NewMockConnection ¶
func NewMockConnection(targetIP string) (bifrost.Connection, error)
func NewMockCrypto ¶
func NewMockKeyOpts ¶
func NewMockServer ¶
Types ¶
type CloseCallBack ¶
type CloseCallBack func()
type MockCloseHandler ¶
type MockCloseHandler func()
type MockConnectionHandler ¶
type MockConnectionHandler func(stream pb.StreamService_BifrostStreamServer)
type MockECDSAKeyRecoverer ¶
type MockECDSAKeyRecoverer struct { }
func (*MockECDSAKeyRecoverer) RecoverKeyFromByte ¶
type MockECDSASigner ¶
type MockECDSAVerifier ¶
type MockECDSAVerifier struct { }
type MockHandler ¶
type MockHandler struct{}
func (MockHandler) ServeError ¶
func (h MockHandler) ServeError(conn bifrost.Connection, err error)
func (MockHandler) ServeRequest ¶
func (h MockHandler) ServeRequest(message bifrost.Message)
type MockPriKey ¶
type MockPriKey struct {
// contains filtered or unexported fields
}
func (*MockPriKey) ID ¶
func (mockPriKey *MockPriKey) ID() bifrost.KeyID
func (*MockPriKey) IsPrivate ¶
func (mockPriKey *MockPriKey) IsPrivate() bool
func (*MockPriKey) KeyGenOpt ¶
func (mockPriKey *MockPriKey) KeyGenOpt() string
func (*MockPriKey) ToByte ¶
func (mockPriKey *MockPriKey) ToByte() ([]byte, error)
type MockPubKey ¶
type MockPubKey struct {
// contains filtered or unexported fields
}
func (*MockPubKey) ID ¶
func (mockPubKey *MockPubKey) ID() bifrost.KeyID
func (*MockPubKey) IsPrivate ¶
func (mockPubKey *MockPubKey) IsPrivate() bool
func (*MockPubKey) KeyGenOpt ¶
func (mockPubKey *MockPubKey) KeyGenOpt() string
func (*MockPubKey) ToByte ¶
func (mockPubKey *MockPubKey) ToByte() ([]byte, error)
type MockRecvHandler ¶
type MockServer ¶
type MockServer struct { Rh MockRecvHandler Ch MockConnectionHandler Clh MockCloseHandler }
func (MockServer) BifrostStream ¶
func (ms MockServer) BifrostStream(stream pb.StreamService_BifrostStreamServer) error
type MockStreamServer ¶
type MockStreamServer struct {
// contains filtered or unexported fields
}
func NewMockStreamServer ¶
func NewMockStreamServer(peerInfo bifrost.PeerInfo) *MockStreamServer
func (MockStreamServer) Context ¶
func (MockStreamServer) Context() context.Context
func (MockStreamServer) RecvMsg ¶
func (MockStreamServer) RecvMsg(m interface{}) error
func (MockStreamServer) SendHeader ¶
func (MockStreamServer) SendHeader(metadata.MD) error
func (MockStreamServer) SendMsg ¶
func (MockStreamServer) SendMsg(m interface{}) error
func (MockStreamServer) SetTrailer ¶
func (MockStreamServer) SetTrailer(metadata.MD)
type MockStreamWrapper ¶
type MockStreamWrapper struct { SendCallBack SendCallBack CloseCallBack CloseCallBack }
func (MockStreamWrapper) Close ¶
func (msw MockStreamWrapper) Close()
func (MockStreamWrapper) GetStream ¶
func (MockStreamWrapper) GetStream() bifrost.Stream
type MockvalueCtx ¶
func (*MockvalueCtx) String ¶
func (c *MockvalueCtx) String() string
func (*MockvalueCtx) Value ¶
func (c *MockvalueCtx) Value(key interface{}) interface{}
type SendCallBack ¶
Click to show internal directories.
Click to hide internal directories.