Documentation ¶
Index ¶
- func ResetMqInMemory()
- func SendEnvelope(q AppResQueue, env Envelope) error
- func SendMessage(q AppResQueue, name string, payload string) error
- type AppResDDb
- type AppResDir
- type AppResDynamoDb
- type AppResFS
- type AppResFileSystem
- type AppResKeyVal
- type AppResQueue
- type AppResQueueAws
- func (q *AppResQueueAws) Commit() error
- func (q *AppResQueueAws) GetQueueUrl(queueName string) (*sqs.GetQueueUrlOutput, error)
- func (q *AppResQueueAws) Init() error
- func (q *AppResQueueAws) Name() string
- func (q *AppResQueueAws) Retrieve() (*string, error)
- func (q *AppResQueueAws) Send(Message string) error
- type AppResRedis
- type AppResS3
- type AppResources
- type Envelope
- type GsbEnvVar
- type Handler
- type HandlerFn
- type HandlerState
- type Host
- func (h *Host) AddHandler(name string, f HandlerFn)
- func (h *Host) Init()
- func (h *Host) InitErrorQueue()
- func (h *Host) InitMq()
- func (h *Host) MqCommit() error
- func (h *Host) MqRetrieve() *Envelope
- func (h *Host) ProcessError(env *Envelope, err error)
- func (h *Host) ProcessHandlers(env *Envelope) error
- func (h *Host) ProcessMessage(env *Envelope)
- func (h *Host) Run()
- func (h *Host) Tick()
- type Mq
- type MqAws
- type MqBeanstalk
- type MqInMemory
- type Queue
- type QueueBeanstalk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetMqInMemory ¶
func ResetMqInMemory()
func SendEnvelope ¶
func SendEnvelope(q AppResQueue, env Envelope) error
func SendMessage ¶
func SendMessage(q AppResQueue, name string, payload string) error
Types ¶
type AppResDir ¶
type AppResDir struct {
// contains filtered or unexported fields
}
func NewAppResDir ¶
type AppResDynamoDb ¶
type AppResDynamoDb struct {
// contains filtered or unexported fields
}
func NewAppResDynamoDb ¶
func NewAppResDynamoDb(url *url.URL) *AppResDynamoDb
func (*AppResDynamoDb) Get ¶
func (ddb *AppResDynamoDb) Get(tableName string, key map[string]string) (interface{}, error)
func (*AppResDynamoDb) Init ¶
func (ddb *AppResDynamoDb) Init() error
func (*AppResDynamoDb) Put ¶
func (ddb *AppResDynamoDb) Put(tableName string, item interface{}) error
type AppResFS ¶
type AppResFS struct {
// contains filtered or unexported fields
}
func NewAppResFS ¶
type AppResFileSystem ¶
type AppResKeyVal ¶
type AppResQueue ¶
type AppResQueueAws ¶
type AppResQueueAws struct {
// contains filtered or unexported fields
}
func NewAppResQueueAws ¶
func NewAppResQueueAws(url *url.URL) *AppResQueueAws
func (*AppResQueueAws) Commit ¶
func (q *AppResQueueAws) Commit() error
func (*AppResQueueAws) GetQueueUrl ¶
func (q *AppResQueueAws) GetQueueUrl(queueName string) (*sqs.GetQueueUrlOutput, error)
func (*AppResQueueAws) Init ¶
func (q *AppResQueueAws) Init() error
func (*AppResQueueAws) Name ¶
func (q *AppResQueueAws) Name() string
func (*AppResQueueAws) Retrieve ¶
func (q *AppResQueueAws) Retrieve() (*string, error)
func (*AppResQueueAws) Send ¶
func (q *AppResQueueAws) Send(Message string) error
type AppResRedis ¶
type AppResRedis struct {
// contains filtered or unexported fields
}
func NewAppResRedis ¶
func NewAppResRedis(url *url.URL) *AppResRedis
func (*AppResRedis) Del ¶
func (r *AppResRedis) Del(key string) error
func (*AppResRedis) Get ¶
func (r *AppResRedis) Get(key string) (interface{}, error)
func (*AppResRedis) Init ¶
func (r *AppResRedis) Init() error
func (*AppResRedis) Put ¶
func (r *AppResRedis) Put(key string, item interface{}) error
type AppResS3 ¶
type AppResS3 struct {
// contains filtered or unexported fields
}
func NewAppResS3 ¶
type AppResources ¶
type AppResources struct { DDb map[string]AppResDDb KeyVal map[string]AppResKeyVal FileSystem map[string]AppResFileSystem Queue map[string]AppResQueue }
func NewAppResources ¶
func NewAppResources() *AppResources
func (*AppResources) GetGSBEnvVars ¶
func (ar *AppResources) GetGSBEnvVars() []string
func (*AppResources) Init ¶
func (ar *AppResources) Init()
func (*AppResources) ProcessEnvVar ¶
func (ar *AppResources) ProcessEnvVar(gsbEnvVarStr string) GsbEnvVar
func (*AppResources) ProcessEnvVars ¶
func (ar *AppResources) ProcessEnvVars(gsbEnvVarStrs []string)
type Envelope ¶
type Envelope struct { Identifier string Name string Msg string OriginalQueueName string Errors []string }
func NewEnvelope ¶
func UnmarshalEnvelope ¶
type HandlerFn ¶
type HandlerFn func(*HandlerState, string) error
type HandlerState ¶
type HandlerState struct { AppResources *AppResources Keys map[string]string }
func NewHandlerState ¶
func NewHandlerState(appResources *AppResources) *HandlerState
type Host ¶
type Host struct { Name string Mq Mq MqUrl *url.URL ErrorQ Queue Handlers []Handler // contains filtered or unexported fields }
func (*Host) AddHandler ¶
func (*Host) InitErrorQueue ¶
func (h *Host) InitErrorQueue()
func (*Host) MqRetrieve ¶
func (*Host) ProcessError ¶
func (*Host) ProcessHandlers ¶
func (*Host) ProcessMessage ¶
type MqBeanstalk ¶
type MqBeanstalk struct {
// contains filtered or unexported fields
}
func NewMqBeanstalk ¶
func NewMqBeanstalk(url *url.URL) *MqBeanstalk
func (*MqBeanstalk) Commit ¶
func (mq *MqBeanstalk) Commit() error
func (*MqBeanstalk) Init ¶
func (mq *MqBeanstalk) Init() error
func (*MqBeanstalk) Retrieve ¶
func (mq *MqBeanstalk) Retrieve() (*string, error)
type MqInMemory ¶
type MqInMemory struct { List []string // contains filtered or unexported fields }
func NewMqInMemory ¶
func NewMqInMemory(url *url.URL) *MqInMemory
func NewMqInMemoryFromString ¶
func NewMqInMemoryFromString(urlString string) *MqInMemory
func (*MqInMemory) Commit ¶
func (mq *MqInMemory) Commit() error
func (*MqInMemory) Init ¶
func (mq *MqInMemory) Init() error
func (*MqInMemory) Move ¶
func (mq *MqInMemory) Move(fromS string, toS string)
func (*MqInMemory) Name ¶
func (mq *MqInMemory) Name() string
func (*MqInMemory) Retrieve ¶
func (mq *MqInMemory) Retrieve() (*string, error)
func (*MqInMemory) Send ¶
func (mq *MqInMemory) Send(payload string) error
type Queue ¶
type QueueBeanstalk ¶
type QueueBeanstalk struct {
// contains filtered or unexported fields
}
func NewAppResQueueBeanstalk ¶
func NewAppResQueueBeanstalk(url *url.URL) *QueueBeanstalk
func (*QueueBeanstalk) Commit ¶
func (q *QueueBeanstalk) Commit() error
func (*QueueBeanstalk) Init ¶
func (q *QueueBeanstalk) Init() error
func (*QueueBeanstalk) Name ¶
func (q *QueueBeanstalk) Name() string
func (*QueueBeanstalk) Retrieve ¶
func (q *QueueBeanstalk) Retrieve() (*string, error)
func (*QueueBeanstalk) Send ¶
func (q *QueueBeanstalk) Send(payload string) error
Click to show internal directories.
Click to hide internal directories.