diff options
Diffstat (limited to 'bst/interface.go')
-rw-r--r-- | bst/interface.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bst/interface.go b/bst/interface.go new file mode 100644 index 00000000..95b03e11 --- /dev/null +++ b/bst/interface.go @@ -0,0 +1,13 @@ +package bst + +// Storage is general in-memory BST storage implementation +type Storage interface { + // Insert inserts to a vertex with topic ident connection uuid + Insert(uuid string, topic string) + // Remove removes uuid from topic, if the uuid is single for a topic, whole vertex will be removed + Remove(uuid, topic string) + // Get will return all connections associated with the topic + Get(topic string) map[string]struct{} + // Contains checks if the BST contains a topic + Contains(topic string) bool +} |