storage

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultModCache

type DefaultModCache struct {
	// contains filtered or unexported fields
}

func NewDefaultModCache

func NewDefaultModCache() *DefaultModCache

func (*DefaultModCache) Delete

func (c *DefaultModCache) Delete(id uuid.UUID) error

func (*DefaultModCache) Get

func (*DefaultModCache) Put

type MemoryStore

type MemoryStore struct {
	// contains filtered or unexported fields
}

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) CreateDeploy

func (s *MemoryStore) CreateDeploy(deploy *types.Deploy) error

func (*MemoryStore) CreateEndpoint

func (s *MemoryStore) CreateEndpoint(e *types.Endpoint) error

func (*MemoryStore) GetDeploy

func (s *MemoryStore) GetDeploy(id uuid.UUID) (*types.Deploy, error)

func (*MemoryStore) GetEndpoint

func (s *MemoryStore) GetEndpoint(id uuid.UUID) (*types.Endpoint, error)

func (*MemoryStore) UpdateEndpoint

func (s *MemoryStore) UpdateEndpoint(id uuid.UUID, params UpdateEndpointParams) error

type MetricStore

type MetricStore interface {
	CreateRuntimeMetric(*types.RuntimeMetric) error
	GetRuntimeMetrics(uuid.UUID) ([]types.RuntimeMetric, error)
}

type ModCacher

type ModCacher interface {
	Put(uuid.UUID, wazero.CompilationCache)
	Get(uuid.UUID) (wazero.CompilationCache, bool)
	Delete(uuid.UUID) error
}

type RedisStore

type RedisStore struct {
	// contains filtered or unexported fields
}

RedisStore is the Redis implementation of a Storage interface.

func NewRedisStore

func NewRedisStore() (*RedisStore, error)

NewRedisStore returns a new RedisStore.

This will return an error if we failed to ping the Redis server.

func (*RedisStore) CreateDeploy

func (s *RedisStore) CreateDeploy(deploy *types.Deploy) error

func (*RedisStore) CreateEndpoint

func (s *RedisStore) CreateEndpoint(endpoint *types.Endpoint) error

func (*RedisStore) CreateRuntimeMetric

func (s *RedisStore) CreateRuntimeMetric(metric *types.RuntimeMetric) error

func (*RedisStore) GetDeploy

func (s *RedisStore) GetDeploy(id uuid.UUID) (*types.Deploy, error)

func (*RedisStore) GetEndpoint

func (s *RedisStore) GetEndpoint(id uuid.UUID) (*types.Endpoint, error)

func (*RedisStore) GetEndpoints

func (s *RedisStore) GetEndpoints() ([]types.Endpoint, error)

func (*RedisStore) GetRuntimeMetrics

func (s *RedisStore) GetRuntimeMetrics(id uuid.UUID) ([]types.RuntimeMetric, error)

func (*RedisStore) UpdateEndpoint

func (s *RedisStore) UpdateEndpoint(id uuid.UUID, params UpdateEndpointParams) error

type Store

type Store interface {
	CreateEndpoint(*types.Endpoint) error
	UpdateEndpoint(uuid.UUID, UpdateEndpointParams) error
	GetEndpoint(uuid.UUID) (*types.Endpoint, error)
	GetEndpoints() ([]types.Endpoint, error)
	CreateDeploy(*types.Deploy) error
	GetDeploy(uuid.UUID) (*types.Deploy, error)
}

type UpdateEndpointParams

type UpdateEndpointParams struct {
	Environment    map[string]string
	ActiveDeployID uuid.UUID
	Deploys        []*types.Deploy
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL