Documentation
¶
Overview ¶
Package inmem implements a layer of services in memory using purely Go constructs. In theory, they can be swapped out for services implemented using other tech, e.g. databases, redis, etc.
Index ¶
- func NewCache(config CacheConfig) (*bigcache.BigCache, error)
- type CacheConfig
- type ChunkProxy
- func (c *ChunkProxy) GetChunk(ctx context.Context, opts otf.GetChunkOptions) (otf.Chunk, error)
- func (c *ChunkProxy) GetChunkByID(ctx context.Context, chunkID int) (otf.PersistedChunk, error)
- func (c *ChunkProxy) PutChunk(ctx context.Context, chunk otf.Chunk) (otf.PersistedChunk, error)
- func (c *ChunkProxy) Start(ctx context.Context) error
- type CloudService
- type PubSub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheConfig ¶ added in v0.0.11
type ChunkProxy ¶ added in v0.0.11
type ChunkProxy struct {
otf.Application
logr.Logger
// contains filtered or unexported fields
}
ChunkProxy is a caching proxy for log chunks, proxying requests to the backend.
func NewChunkProxy ¶ added in v0.0.11
func NewChunkProxy(app otf.Application, logger logr.Logger, cache otf.Cache, backend otf.ChunkStore) (*ChunkProxy, error)
func (*ChunkProxy) GetChunk ¶ added in v0.0.11
func (c *ChunkProxy) GetChunk(ctx context.Context, opts otf.GetChunkOptions) (otf.Chunk, error)
GetChunk attempts to retrieve a chunk from the cache before falling back to using the backend store.
func (*ChunkProxy) GetChunkByID ¶ added in v0.0.12
func (c *ChunkProxy) GetChunkByID(ctx context.Context, chunkID int) (otf.PersistedChunk, error)
func (*ChunkProxy) PutChunk ¶ added in v0.0.11
func (c *ChunkProxy) PutChunk(ctx context.Context, chunk otf.Chunk) (otf.PersistedChunk, error)
PutChunk writes a chunk of data to the backend store before caching it.
type CloudService ¶ added in v0.0.19
type CloudService struct {
// contains filtered or unexported fields
}
func NewCloudService ¶ added in v0.0.19
func NewCloudService(configs ...cloud.Config) (*CloudService, error)
func NewTestCloudService ¶ added in v0.0.19
func NewTestCloudService() *CloudService
func (*CloudService) GetCloudConfig ¶ added in v0.0.19
func (cs *CloudService) GetCloudConfig(name string) (cloud.Config, error)
func (*CloudService) ListCloudConfigs ¶ added in v0.0.19
func (cs *CloudService) ListCloudConfigs() []cloud.Config
Click to show internal directories.
Click to hide internal directories.