storage

package
v0.0.0-...-8396750 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 10 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) CreateDeployment

func (s *MemoryStore) CreateDeployment(deploy *types.Deployment) error

func (*MemoryStore) CreateEndpoint

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

func (*MemoryStore) CreateRuntimeMetric

func (s *MemoryStore) CreateRuntimeMetric(_ *types.RuntimeMetric) error

func (*MemoryStore) GetDeployment

func (s *MemoryStore) GetDeployment(id uuid.UUID) (*types.Deployment, error)

func (*MemoryStore) GetEndpoint

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

func (*MemoryStore) GetRuntimeMetrics

func (s *MemoryStore) GetRuntimeMetrics(_ uuid.UUID) ([]types.RuntimeMetric, 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 SQLStore

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

func NewSQLStore

func NewSQLStore(user, password, dbname, host, port, sslmode string) (*SQLStore, error)

func (*SQLStore) CreateDeployment

func (s *SQLStore) CreateDeployment(deploy *types.Deployment) error

func (*SQLStore) CreateEndpoint

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

func (*SQLStore) CreateRuntimeMetric

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

func (*SQLStore) GetDeployment

func (s *SQLStore) GetDeployment(id uuid.UUID) (*types.Deployment, error)

func (*SQLStore) GetEndpoint

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

func (*SQLStore) GetEndpoints

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

func (*SQLStore) GetRuntimeMetrics

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

func (*SQLStore) UpdateEndpoint

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

type Scanner

type Scanner interface {
	Scan(dest ...interface{}) error
}

type Store

type Store interface {
	CreateEndpoint(*types.Endpoint) error
	UpdateEndpoint(uuid.UUID, UpdateEndpointParams) error
	GetEndpoint(uuid.UUID) (*types.Endpoint, error)
	CreateDeployment(*types.Deployment) error
	GetDeployment(uuid.UUID) (*types.Deployment, error)
}

type UpdateEndpointParams

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

Jump to

Keyboard shortcuts

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