Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrBackendNotFound = Error("backend not found") ErrTopicNotFound = Error("topic not found") ErrTopicAlreadyExists = Error("topic already exists") )
Errors.
View Source
const Version = "v0.1.0-DEV"
Version represents the current build version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // Get a topic by name. Topic(name string) (Topic, error) // Close the backend connection. Close() error }
A Backend is able to create topics that can be used to store data.
type Plugin ¶
type Plugin interface { // Unique name of the plugin Name() string // Gracefully closes the plugin Close() error // Wait for the plugin to quit or crash. This is a blocking operation. Wait() error }
Plugin is a generic lobby plugin.
type PrefixWriter ¶
type PrefixWriter struct {
// contains filtered or unexported fields
}
PrefixWriter is a writer that adds a prefix before every line.
func NewFuncPrefixWriter ¶
func NewFuncPrefixWriter(prefixFn func() []byte, to io.Writer) *PrefixWriter
NewFuncPrefixWriter creates a PrefixWriter that uses a function to generate a prefix.
func NewPrefixWriter ¶
func NewPrefixWriter(prefix string, to io.Writer) *PrefixWriter
NewPrefixWriter creates a PrefixWriter.
type Registry ¶
type Registry interface { Backend // Register a backend under the given name. RegisterBackend(name string, backend Backend) // Create a topic and register it to the Registry. Create(backendName, topicName string) error }
A Registry manages the topics, their configuration and their associated Backend.
type Server ¶
type Server interface { // Name returns the server short description. e.g: "http", "grpc", etc. Name() string // Serve incoming requests. Must block. Serve(net.Listener) error // Stop gracefully stops the server. Stop() error }
A Server serves incoming requests.
Directories ¶
Path | Synopsis |
---|---|
backend
|
|
boltpb
Package boltpb is a generated protocol buffer package.
|
Package boltpb is a generated protocol buffer package. |
cmd
|
|
etcdpb
Package etcdpb is a generated protocol buffer package.
|
Package etcdpb is a generated protocol buffer package. |
proto
Package proto is a generated protocol buffer package.
|
Package proto is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.