Documentation
¶
Index ¶
- Variables
- type InMemory
- func (i *InMemory) GetSpy() *util.Spy
- func (i *InMemory) Marshal(ctx context.Context, raw interface{}) error
- func (i *InMemory) Read(_ context.Context) ([]byte, error)
- func (i *InMemory) ReadForWrite(_ context.Context) ([]byte, error)
- func (i *InMemory) Unlock(_ context.Context) error
- func (i *InMemory) Write(ctx context.Context, data []byte) error
- func (i *InMemory) WriteLocked(_ context.Context, data []byte) error
- type Local
- type S3
- func (s *S3) Delete(ctx context.Context, path string) error
- func (s *S3) Read(ctx context.Context) ([]byte, error)
- func (s *S3) ReadForWrite(ctx context.Context) ([]byte, error)
- func (s *S3) Unlock(ctx context.Context) error
- func (s *S3) Write(ctx context.Context, data []byte) error
- func (s *S3) WriteLocked(ctx context.Context, data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultWaitTime = 100 * time.Millisecond
DefaultWaitTime is the default time to wait between retries.
Functions ¶
This section is empty.
Types ¶
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
NewInMemory creates a new InMemory instance.
func (*InMemory) Marshal ¶
Marshal marshals the raw data and stores it. This is designed to make writing tests simpler.
func (*InMemory) ReadForWrite ¶
ReadForWrite reads the file after acquiring the lock.
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local is a file-based Store implementation.
func (*Local) ReadForWrite ¶
ReadForWrite reads the file after acquiring the lock.
func (*Local) Unlock ¶
Unlock removes the lock file. It returns an error if the lock file does not exist.
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 is a store that uses AWS S3 to store and retrieve data.
func (*S3) ReadForWrite ¶
ReadForWrite reads the data from S3, but also locks it for later writing.
Click to show internal directories.
Click to hide internal directories.