Documentation ¶
Index ¶
- type AWSConfig
- type Application
- type ChangeVisibilityMessage
- type Config
- type Container
- type Credential
- type DeletableMessage
- type EndPoint
- type Handler
- type HandlerContainer
- type LogLevel
- type Logger
- type Message
- type Profile
- type QueueConfig
- type QueueDriver
- type QueueSessionUpdater
- type SessionManager
- type SessionManagerFactory
- type StorageConfig
- type StorageDriver
- type StorageSessionUpdater
- type Subscriber
- type Updatable
- type WorkerCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
type AWSConfig struct { Endpoint *EndPoint `toml:"endpoint,omitempty" mapstructure:"endpoint,omitempty"` Credential *Credential `toml:"credential,omitempty" mapstructure:"queue_credential,omitempty"` Profile *Profile `toml:"profile,omitempty" mapstructure:"queue_profile,omitempty"` }
type Application ¶
type ChangeVisibilityMessage ¶
type ChangeVisibilityMessage interface {
GetChangeVisibilityID() string
}
type Config ¶
type Config struct { Queue QueueConfig `mapstructure:"queue"` Storage StorageConfig `mapstructure:"storage"` }
type Credential ¶
type DeletableMessage ¶
type HandlerContainer ¶
type Message ¶
type Message interface { GetID() string GetDeduplicationID() string DeletableMessage ChangeVisibilityMessage GetBody() []byte }
type QueueConfig ¶
type QueueConfig struct { Endpoint *EndPoint `mapstructure:"endpoint,omitempty"` Credential *Credential `mapstructure:"credential,omitempty"` Profile *Profile `mapstructure:"profile,omitempty"` URL string `mapstructure:"url"` }
func (QueueConfig) GetAWSConfig ¶
func (qc QueueConfig) GetAWSConfig() AWSConfig
type QueueDriver ¶
type QueueDriver interface { GetConfig() *QueueConfig GetMessage(num int) ([]Message, error) PutMessage(raw []byte, delay int32) error DeleteMessage(msg DeletableMessage) error GetMessageLength() ([]string, error) ChangeMessageVisibility(msg ChangeVisibilityMessage, second int32) error }
type QueueSessionUpdater ¶
type QueueSessionUpdater interface {
UpdateQueue(cfg *QueueConfig) (QueueDriver, error)
}
type SessionManager ¶
type SessionManager interface { UpdateSession() CreateStorageWithConfig(customConfig StorageConfig) (StorageDriver, error) CreateQueueWithConfig(customConfig QueueConfig) (QueueDriver, error) GetQueue() (QueueDriver, error) GetStorage() (StorageDriver, error) QueueSessionUpdater StorageSessionUpdater }
type SessionManagerFactory ¶
type SessionManagerFactory interface { Create() (SessionManager, error) CreateWithConfig(queue QueueConfig, session StorageConfig) (SessionManager, error) }
type StorageConfig ¶
type StorageConfig struct { Endpoint *EndPoint `mapstructure:"endpoint,omitempty"` Credential *Credential `mapstructure:"credential,omitempty"` Profile *Profile `mapstructure:"profile,omitempty"` }
func (StorageConfig) GetAWSConfig ¶
func (sc StorageConfig) GetAWSConfig() AWSConfig
type StorageDriver ¶
type StorageDriver interface { GetConfig() *StorageConfig Get(root string, path string) ([]byte, error) GetByStream(root string, path string) (io.ReadCloser, error) Download(bucket string, key string, dist string) error Put(root string, path string, raw []byte) error List(root string, prefix string) (list []string, err error, next func() ([]string, error)) }
type StorageSessionUpdater ¶
type StorageSessionUpdater interface {
UpdateStorage(cfg *StorageConfig) (StorageDriver, error)
}
type Subscriber ¶
type Subscriber interface {
Listen()
}
type WorkerCommand ¶
func (*WorkerCommand) SetHandler ¶
func (c *WorkerCommand) SetHandler(handler func(Message) []byte)
Click to show internal directories.
Click to hide internal directories.