Documentation
¶
Index ¶
- type Config
- type Storage
- func (s *Storage) Close()
- func (s *Storage) ClusterExists(ctx context.Context, id string) (bool, error)
- func (s *Storage) CreateAgent(ctx context.Context, agent *v1.Agent) error
- func (s *Storage) CreateCluster(ctx context.Context, cluster *v1.Cluster) error
- func (s *Storage) DeleteAgent(ctx context.Context, id string) error
- func (s *Storage) DeleteCluster(ctx context.Context, id string) error
- func (s *Storage) GetAgent(ctx context.Context, id string) (*v1.Agent, error)
- func (s *Storage) GetCluster(ctx context.Context, id string) (*v1.Cluster, error)
- func (s *Storage) ListAgents(ctx context.Context, clusterID string) ([]*v1.Agent, error)
- func (s *Storage) ListClusters(ctx context.Context) ([]*v1.Cluster, error)
- func (s *Storage) UpdateAgent(ctx context.Context, agent *v1.Agent) error
- func (s *Storage) UpdateCluster(ctx context.Context, cluster *v1.Cluster) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
URL string
MaxConnIdleTime string
ConnectTimeout string
MaxConnections int32
MinConnections int32
}
Config holds PostgreSQL configuration
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage implements the storage.Storage interface using PostgreSQL
func (*Storage) ClusterExists ¶
ClusterExists checks if a cluster exists
func (*Storage) CreateAgent ¶
CreateAgent creates a new agent
func (*Storage) CreateCluster ¶
CreateCluster creates a new cluster
func (*Storage) DeleteAgent ¶
DeleteAgent deletes an agent by ID
func (*Storage) DeleteCluster ¶
DeleteCluster deletes a cluster by ID
func (*Storage) GetCluster ¶
GetCluster retrieves a cluster by ID
func (*Storage) ListAgents ¶
ListAgents lists agents, optionally filtered by cluster
func (*Storage) ListClusters ¶
ListClusters lists all clusters
func (*Storage) UpdateAgent ¶
UpdateAgent updates an existing agent
Click to show internal directories.
Click to hide internal directories.