Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultChunkSize = 1048576 DefaultConfigPath = "config.yaml" DefaultDatabasePath = "ali.db" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseUploadRequest ¶
type BaseUploadRequest struct {
XSession *ali_drive.UploadSession
XFileName string
XSize int64
XChunkHint int64
}
func (*BaseUploadRequest) ChunkHint ¶
func (b *BaseUploadRequest) ChunkHint() int64
func (*BaseUploadRequest) FileName ¶
func (b *BaseUploadRequest) FileName() string
func (*BaseUploadRequest) Session ¶
func (b *BaseUploadRequest) Session() *ali_drive.UploadSession
func (*BaseUploadRequest) Size ¶
func (b *BaseUploadRequest) Size() int64
type ConfigManager ¶
func (*ConfigManager) ReadConfig ¶
func (d *ConfigManager) ReadConfig(configPath string) *ali_notifier.Config
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(options ...Option) *Dispatcher
func (*Dispatcher) GetConfig ¶
func (d *Dispatcher) GetConfig() *ali_notifier.Config
func (*Dispatcher) GetDatabase ¶
func (d *Dispatcher) GetDatabase() *gorm.DB
func (*Dispatcher) Loop ¶
func (d *Dispatcher) Loop()
func (*Dispatcher) OnFsUpload ¶
func (d *Dispatcher) OnFsUpload(req *ali_notifier.FsUploadRequest)
type Option ¶
type Option = func(w *Dispatcher) *Dispatcher
func WithConfig ¶
func WithConfig(cfg *ali_notifier.Config) Option
func WithConfigPath ¶
func WithDBPath ¶
func WithNotifier ¶
func WithNotifier(notifier ali_notifier.INotifier) Option
func WithServiceReplicate ¶
type RandReaderUploadRequest ¶
type RandReaderUploadRequest struct {
BaseUploadRequest
R ali_utils.RandReadCloser
S suppress.ISuppress
}
func (*RandReaderUploadRequest) Done ¶
func (f *RandReaderUploadRequest) Done()
type ServiceContext ¶
type ServiceSuppress ¶
type ServiceSuppress struct {
*Dispatcher
*ServiceContext
}
func (*ServiceSuppress) Suppress ¶
func (s *ServiceSuppress) Suppress(err error)
func (*ServiceSuppress) WarnOnce ¶
func (s *ServiceSuppress) WarnOnce(err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.