EngineHooks into enginehooks.go
continuous-integration/drone/pr Build is pending Details

This commit is contained in:
Sarah Jamie Lewis 2023-04-20 13:38:10 -07:00
parent 93c9813d96
commit 746bfffb7c
2 changed files with 4 additions and 4 deletions

View File

@ -86,10 +86,6 @@ type Engine interface {
Shutdown()
}
type EngineHooks interface {
SendPeerMessage(connection tapir.Connection, message []byte) error
}
// NewProtocolEngine initializes a new engine that runs Cwtch using the given parameters
func NewProtocolEngine(identity primitives.Identity, privateKey ed25519.PrivateKey, acn connectivity.ACN, eventManager event.Manager, peerAuthorizations map[string]model.Authorization, engineHooks EngineHooks) Engine {
engine := new(engine)

View File

@ -2,6 +2,10 @@ package connections
import "git.openprivacy.ca/cwtch.im/tapir"
type EngineHooks interface {
SendPeerMessage(connection tapir.Connection, message []byte) error
}
type DefaultEngineHooks struct {
}