EngineHooks into enginehooks.go
continuous-integration/drone/pr Build is pending
Details
continuous-integration/drone/pr Build is pending
Details
This commit is contained in:
parent
93c9813d96
commit
746bfffb7c
|
@ -86,10 +86,6 @@ type Engine interface {
|
||||||
Shutdown()
|
Shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
type EngineHooks interface {
|
|
||||||
SendPeerMessage(connection tapir.Connection, message []byte) error
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewProtocolEngine initializes a new engine that runs Cwtch using the given parameters
|
// 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 {
|
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)
|
engine := new(engine)
|
||||||
|
|
|
@ -2,6 +2,10 @@ package connections
|
||||||
|
|
||||||
import "git.openprivacy.ca/cwtch.im/tapir"
|
import "git.openprivacy.ca/cwtch.im/tapir"
|
||||||
|
|
||||||
|
type EngineHooks interface {
|
||||||
|
SendPeerMessage(connection tapir.Connection, message []byte) error
|
||||||
|
}
|
||||||
|
|
||||||
type DefaultEngineHooks struct {
|
type DefaultEngineHooks struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue