Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active August 6, 2021 11:39
Show Gist options
  • Save percybolmer/f96b5138db8c2a2fa9fa3ee567e5d9aa to your computer and use it in GitHub Desktop.
Save percybolmer/f96b5138db8c2a2fa9fa3ee567e5d9aa to your computer and use it in GitHub Desktop.
// Engine is a interface that declares what methods a pub/sub engine needs in Go4Data
type Engine interface {
Publish(key string, payloads ...payload.Payload) []PublishingError
PublishTopics(topics []string, payloads ...payload.Payload) []PublishingError
Subscribe(key string, pid uint, queueSize int) (*Pipe, error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment