Documentation ¶
Index ¶
- func NewAWSConfig() *aws.Config
- func NewAWSSession(config *aws.Config) *session.Session
- func NewS3Client(session *session.Session) *s3.S3
- func NewSFTPClient(sshClient *ssh.Client) (*sftp.Client, error)
- func NewSSHClient(host string, port uint32, sshConfig *ssh.ClientConfig) (*ssh.Client, error)
- func NewSSHConfig(user string, password string) *ssh.ClientConfig
- type AWSManager
- type RedisConfig
- type RedisManager
- type RedisWrapper
- func (w *RedisWrapper) AckMessage(group string, ids ...string) (int64, error)
- func (w *RedisWrapper) AddMessage(data map[string]interface{}) (string, error)
- func (w *RedisWrapper) Close() error
- func (w *RedisWrapper) CreateGroup(group string, start string) (string, error)
- func (w *RedisWrapper) DeleteGroup(group string) (int64, error)
- func (w *RedisWrapper) DeleteGroupConsumer(group string) (int64, error)
- func (w *RedisWrapper) DeleteMessage(ids ...string) (int64, error)
- func (w *RedisWrapper) FlushAll() (string, error)
- func (w *RedisWrapper) FlushAllAsync() (string, error)
- func (w *RedisWrapper) FlushDB() (string, error)
- func (w *RedisWrapper) FlushDBAsync() (string, error)
- func (w *RedisWrapper) GetChannel() string
- func (w *RedisWrapper) PendingMessage(group string) (*redis.XPending, error)
- func (w *RedisWrapper) ReadGroupMessage(group string, count int64, block time.Duration, extraIds ...string) ([]redis.XStream, error)
- func (w *RedisWrapper) ReadMessage(lastId string, count int64, block time.Duration) ([]redis.XStream, error)
- func (w *RedisWrapper) ReadRangeMessage(start string, stop string) ([]redis.XMessage, error)
- type S3Manager
- type S3Wrapper
- type SFTPManager
- type SFTPWrapper
- type StorageAccessLayer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAWSConfig ¶
func NewSSHClient ¶
func NewSSHConfig ¶
func NewSSHConfig(user string, password string) *ssh.ClientConfig
Types ¶
type AWSManager ¶
type AWSManager struct { S3Manager *S3Manager // contains filtered or unexported fields }
func NewAWSManager ¶
func NewAWSManager(session *session.Session) *AWSManager
type RedisConfig ¶
func (*RedisConfig) ToOption ¶
func (rc *RedisConfig) ToOption() *redis.Options
type RedisManager ¶
type RedisManager struct {
Clients map[string][]*RedisWrapper
}
func NewRedisManager ¶
func NewRedisManager() *RedisManager
func (*RedisManager) AddClient ¶
func (rw *RedisManager) AddClient(config RedisConfig, category string, channel string, consumerName string) (*RedisWrapper, error)
func (*RedisManager) Close ¶
func (rw *RedisManager) Close() error
func (*RedisManager) GetCategories ¶
func (rw *RedisManager) GetCategories() (clientsCat []string)
type RedisWrapper ¶
type RedisWrapper struct {
// contains filtered or unexported fields
}
func NewRedisWrapper ¶
func NewRedisWrapper(config RedisConfig, channel string, consumerName string) (*RedisWrapper, error)
func (*RedisWrapper) AckMessage ¶
func (w *RedisWrapper) AckMessage(group string, ids ...string) (int64, error)
func (*RedisWrapper) AddMessage ¶
func (w *RedisWrapper) AddMessage(data map[string]interface{}) (string, error)
func (*RedisWrapper) Close ¶
func (w *RedisWrapper) Close() error
func (*RedisWrapper) CreateGroup ¶
func (w *RedisWrapper) CreateGroup(group string, start string) (string, error)
func (*RedisWrapper) DeleteGroup ¶
func (w *RedisWrapper) DeleteGroup(group string) (int64, error)
func (*RedisWrapper) DeleteGroupConsumer ¶
func (w *RedisWrapper) DeleteGroupConsumer(group string) (int64, error)
func (*RedisWrapper) DeleteMessage ¶
func (w *RedisWrapper) DeleteMessage(ids ...string) (int64, error)
func (*RedisWrapper) FlushAll ¶
func (w *RedisWrapper) FlushAll() (string, error)
func (*RedisWrapper) FlushAllAsync ¶
func (w *RedisWrapper) FlushAllAsync() (string, error)
func (*RedisWrapper) FlushDB ¶
func (w *RedisWrapper) FlushDB() (string, error)
func (*RedisWrapper) FlushDBAsync ¶
func (w *RedisWrapper) FlushDBAsync() (string, error)
func (*RedisWrapper) GetChannel ¶
func (w *RedisWrapper) GetChannel() string
func (*RedisWrapper) PendingMessage ¶
func (w *RedisWrapper) PendingMessage(group string) (*redis.XPending, error)
func (*RedisWrapper) ReadGroupMessage ¶
func (*RedisWrapper) ReadMessage ¶
func (*RedisWrapper) ReadRangeMessage ¶
type S3Manager ¶
type S3Manager struct { S3 []StorageAccessLayer // contains filtered or unexported fields }
func NewS3Manager ¶
type SFTPManager ¶
type SFTPManager struct { Conns []*SFTPWrapper // contains filtered or unexported fields }
Manager SFTP connections structure
func NewSFTPManager ¶
func NewSFTPManager(host string, port uint32, sshConfig *ssh.ClientConfig) *SFTPManager
SFTP Manager Construct
func (*SFTPManager) AddClient ¶
func (sm *SFTPManager) AddClient() (*SFTPWrapper, error)
type SFTPWrapper ¶
type SFTPWrapper struct { sync.Mutex Client *sftp.Client // contains filtered or unexported fields }
SFTP connection (with clients)
func NewSFTPWrapper ¶
func NewSFTPWrapper(sshClient *ssh.Client, sftpClient *sftp.Client) *SFTPWrapper
SFTP Wrapper Construct
func (*SFTPWrapper) Close ¶
func (s *SFTPWrapper) Close() error
SFTP Wrapper Close connection => chan notify ssh connection to close
Click to show internal directories.
Click to hide internal directories.