redisdata

package
v0.0.0-...-7f17660 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisCommandStorage

func NewRedisCommandStorage(pool *redis.Pool) core.CommandStorage

Types

type RedisCommandStorage

type RedisCommandStorage struct {
	// contains filtered or unexported fields
}

func (*RedisCommandStorage) CommandsForAgent

func (store *RedisCommandStorage) CommandsForAgent(agentID core.AgentID) <-chan core.Command

Communication errors in the command-producing channels are swallowed and handled discretely

func (*RedisCommandStorage) QueueReceivedCommand

func (store *RedisCommandStorage) QueueReceivedCommand(agentID core.AgentID, command *core.Command) error

func (*RedisCommandStorage) ReportUndeliveredCommand

func (store *RedisCommandStorage) ReportUndeliveredCommand(agentID core.AgentID, command *core.Command) error

func (*RedisCommandStorage) SetCommandResult

func (store *RedisCommandStorage) SetCommandResult(result *core.CommandResult) error

type RedisData

type RedisData struct {
	// contains filtered or unexported fields
}

func NewRedisData

func NewRedisData(redisPool *redis.Pool) *RedisData

Constructs and returns a new RedisData instance which implements the following interfaces:

  • core.Incoming
  • core.CommandStorage
  • core.CommandLogger

func (*RedisData) IsCommandFormatError

func (store *RedisData) IsCommandFormatError(err error) bool

func (*RedisData) LogCommand

func (redisData *RedisData) LogCommand(command *core.Command) error

func (*RedisData) ReceiveCommand

func (redisData *RedisData) ReceiveCommand() (*core.Command, error)

func (*RedisData) RespondToCommandAsJustQueued

func (redisData *RedisData) RespondToCommandAsJustQueued(agentID core.AgentID, command *core.Command) error

func (*RedisData) SignalCommandAsQueued

func (redisData *RedisData) SignalCommandAsQueued(commandID string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL