Documentation
¶
Index ¶
- type DataStorage
- type Frames
- type Processors
- func (s *Processors) Close() error
- func (s *Processors) Delete(processor string, key string)
- func (s *Processors) DeleteAll(processor string)
- func (s *Processors) Err() error
- func (s *Processors) Exists(processor string) bool
- func (s *Processors) Get(processor string, key string) (string, bool)
- func (s *Processors) GetKeys(processor string) ([]string, bool)
- func (s *Processors) Set(processor string, key string, val string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStorage ¶ added in v0.4.0
type DataStorage interface { Get(string, string) (string, bool) GetKeys(string) ([]string, bool) Set(string, string, string) error Delete(string, string) DeleteAll(string) Exists(string) bool Err() error Close() error }
DataStorage is an interface for a data storage system. It defines methods for getting, setting, deleting, and checking the existence of data. The interface is designed to be implemented by different storage backends, such as in-memory storage, file-based storage, or database storage.
type Frames ¶
type Frames struct {
// contains filtered or unexported fields
}
Frames is the store for data that is specific to a single frame. It is used to store data that is associated with a specific frame in a video or image sequence. The data is stored in a map where the key is the frame number and the value is another map that contains key-value pairs of data associated with that frame.
type Processors ¶
type Processors struct {
// contains filtered or unexported fields
}
Processors is the store for data that is not specific to a single frame but applies to a single processor.
func NewProcessors ¶
func NewProcessors(s DataStorage) *Processors
NewProcessors creates a new Processors data store.
func (*Processors) Close ¶ added in v0.4.0
func (s *Processors) Close() error
Close closes the underlying storage.
func (*Processors) Delete ¶
func (s *Processors) Delete(processor string, key string)
Delete deletes data from the store.
func (*Processors) DeleteAll ¶
func (s *Processors) DeleteAll(processor string)
DeleteAll deletes all data for a specific processor from the store.
func (*Processors) Err ¶ added in v0.4.0
func (s *Processors) Err() error
Err returns last operational error if any. nil otherwise.
func (*Processors) Exists ¶
func (s *Processors) Exists(processor string) bool
Exists returns true if there is any data for a specific processor in the store.
func (*Processors) Get ¶
func (s *Processors) Get(processor string, key string) (string, bool)
Get returns a data value from the store.