Documentation ¶
Index ¶
- type Redis
- func (s *Redis) Add(i sdk.CDNItemUnit, score uint, since uint, value string) error
- func (s *Redis) BufferType() storage.CDNBufferType
- func (s *Redis) Card(i sdk.CDNItemUnit) (int, error)
- func (s *Redis) GetDriverName() string
- func (s *Redis) Init(_ context.Context, cfg interface{}, bufferType storage.CDNBufferType) error
- func (s *Redis) ItemExists(_ context.Context, _ *gorpmapper.Mapper, _ gorp.SqlExecutor, i sdk.CDNItem) (bool, error)
- func (s *Redis) Keys() ([]string, error)
- func (s *Redis) NewAdvancedReader(_ context.Context, i sdk.CDNItemUnit, format sdk.CDNReaderFormat, from int64, ...) (io.ReadCloser, error)
- func (s *Redis) NewReader(_ context.Context, i sdk.CDNItemUnit) (io.ReadCloser, error)
- func (s *Redis) Read(_ sdk.CDNItemUnit, r io.Reader, w io.Writer) error
- func (s *Redis) Remove(_ context.Context, i sdk.CDNItemUnit) error
- func (s *Redis) ResyncWithDatabase(ctx context.Context, _ gorp.SqlExecutor, _ sdk.CDNItemType, _ bool)
- func (s *Redis) Size(i sdk.CDNItemUnit) (int64, error)
- func (s *Redis) Status(_ context.Context) []sdk.MonitoringStatusLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct { storage.AbstractUnit // contains filtered or unexported fields }
func (*Redis) BufferType ¶
func (s *Redis) BufferType() storage.CDNBufferType
func (*Redis) GetDriverName ¶
func (*Redis) ItemExists ¶
func (*Redis) NewAdvancedReader ¶
func (s *Redis) NewAdvancedReader(_ context.Context, i sdk.CDNItemUnit, format sdk.CDNReaderFormat, from int64, size uint, sort int64) (io.ReadCloser, error)
NewAdvancedReader instanciate a reader from given option, format can be JSON or Text. If from is < 0, read end lines (ex: from=-100 size=0 means read the last 100 lines)
func (*Redis) NewReader ¶
func (s *Redis) NewReader(_ context.Context, i sdk.CDNItemUnit) (io.ReadCloser, error)
NewReader instanciate a reader that it able to iterate over Redis storage unit with a score step of 100.0, starting at score 0
func (*Redis) ResyncWithDatabase ¶
func (s *Redis) ResyncWithDatabase(ctx context.Context, _ gorp.SqlExecutor, _ sdk.CDNItemType, _ bool)
Click to show internal directories.
Click to hide internal directories.