Documentation ¶
Overview ¶
Google cloud Pub/Sub implementation of Storage
Google cloud Pub/Sub implementation of Storage
Index ¶
- type Badger
- func (b *Badger) Close() error
- func (b *Badger) Delete(key string) error
- func (b *Badger) Get(key string) ([]byte, error)
- func (b *Badger) GetStream(key string) (<-chan []byte, <-chan error)
- func (b *Badger) InitChannelsStorage(channels []string) error
- func (b *Badger) Put(key string, value []byte) error
- type Nats
- type PubSub
- func (p *PubSub) Close() error
- func (p *PubSub) Delete(key string) error
- func (p *PubSub) Get(topic string) ([]byte, error)
- func (p *PubSub) GetStream(topic string) (<-chan []byte, <-chan error)
- func (p *PubSub) InitChannelsStorage(channels []string) error
- func (p *PubSub) Put(topic string, msg []byte) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Badger ¶
type Badger struct {
// contains filtered or unexported fields
}
func (*Badger) InitChannelsStorage ¶
type Nats ¶
func (*Nats) GetStream ¶
GetStream reads a stream of messages from topic and writes them to the channel.
func (*Nats) InitChannelsStorage ¶
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
func (*PubSub) GetStream ¶
GetStream reads a stream of messages from topic and writes them to the channel.
func (*PubSub) InitChannelsStorage ¶
type Storage ¶
type Storage interface { // init storage (initial setup of storage and connection create operations) InitChannelsStorage(channels []string) error // put value by key Put(key string, value []byte) error // get data from storage by specified key Get(key string) ([]byte, error) // get channel with some data from storage (for message broker storage implementations) GetStream(key string) (<-chan []byte, <-chan error) // remove parser.Data from storage Delete(key string) error // close connection to storage (network connections, file descriptors, goroutines) Close() error }
Storage interface is a contract for storage implementations
Click to show internal directories.
Click to hide internal directories.