Versions in this module Expand all Collapse all v6 v6.2.0 May 31, 2024 Changes in this version type ClusterTx — linux/amd64 + func (c *ClusterTx) GetNetworkACLsAllProjects(ctx context.Context) (map[string][]string, error) + func (c *ClusterTx) GetNetworkZoneURIs(ctx context.Context, projectID int, project string) ([]string, error) + func (c *ClusterTx) GetNetworksAllProjects(ctx context.Context) (map[string][]string, error) + func (c *ClusterTx) GetStorageBucketURIs(ctx context.Context, project string) ([]string, error) v6.1.0 May 4, 2024 Changes in this version + const ClusterMemberStateCreated — linux/amd64 + const ClusterMemberStateEvacuated — linux/amd64 + const ClusterMemberStatePending — linux/amd64 + const ClusterRoleDatabase — linux/amd64 + const ClusterRoleDatabaseLeader — linux/amd64 + const ClusterRoleDatabaseStandBy — linux/amd64 + const ClusterRoleEventHub — linux/amd64 + const ClusterRoleOVNChassis — linux/amd64 + const DefaultOfflineThreshold — linux/amd64 + const RaftSpare — linux/amd64 + const RaftStandBy — linux/amd64 + const RaftVoter — linux/amd64 + const StoragePoolVolumeContentTypeBlock — linux/amd64 + const StoragePoolVolumeContentTypeFS — linux/amd64 + const StoragePoolVolumeContentTypeISO — linux/amd64 + const StoragePoolVolumeContentTypeNameBlock — linux/amd64 + const StoragePoolVolumeContentTypeNameFS — linux/amd64 + const StoragePoolVolumeContentTypeNameISO — linux/amd64 + const StoragePoolVolumeTypeContainer — linux/amd64 + const StoragePoolVolumeTypeCustom — linux/amd64 + const StoragePoolVolumeTypeImage — linux/amd64 + const StoragePoolVolumeTypeNameContainer — linux/amd64 + const StoragePoolVolumeTypeNameCustom — linux/amd64 + const StoragePoolVolumeTypeNameImage — linux/amd64 + const StoragePoolVolumeTypeNameVM — linux/amd64 + const StoragePoolVolumeTypeVM — linux/amd64 + var ClusterRoles = map[int]ClusterRole — linux/amd64 + var ErrAlreadyDefined = fmt.Errorf("The record already exists") + var ErrInstanceListStop = fmt.Errorf("search stopped") — linux/amd64 + var ErrNoClusterMember = fmt.Errorf("No cluster member found") + var ErrSomeNodesAreBehind = fmt.Errorf("some nodes are behind this node's version") — linux/amd64 + var ErrUnknownEntityID = fmt.Errorf("Unknown entity ID") — linux/amd64 + var ImageSourceProtocol = map[int]string — linux/amd64 + var NodeSpecificNetworkConfig = []string — linux/amd64 + var NodeSpecificStorageConfig = []string — linux/amd64 + var StoragePoolVolumeTypeNames = map[int]string — linux/amd64 + var StorageRemoteDriverNames func() []string — linux/amd64 + func ClusterGroupToAPI(clusterGroup *cluster.ClusterGroup, nodes []string) *api.ClusterGroup — linux/amd64 + func CreateInstanceConfig(ctx context.Context, tx *sql.Tx, id int, config map[string]string) error — linux/amd64 + func DqliteLatestSegment() (string, error) — linux/amd64 + func ExpandInstanceConfig(config map[string]string, profiles []api.Profile) map[string]string — linux/amd64 + func ExpandInstanceDevices(devices deviceConfig.Devices, profiles []api.Profile) deviceConfig.Devices — linux/amd64 + func NetworkStateToAPIStatus(state NetworkState) string — linux/amd64 + func NewTestDqliteServer(t *testing.T) (string, driver.NodeStore, func()) — linux/amd64 + func StoragePoolStateToAPIStatus(state StoragePoolState) string — linux/amd64 + func StoragePoolVolumeTypeToName(volumeType int) (string, error) — linux/amd64 + func TxCommit(tx *sql.Tx) error — linux/amd64 + func UpdateInstance(tx *sql.Tx, id int, description string, architecture int, ephemeral bool, ...) error — linux/amd64 + type Cluster struct — linux/amd64 + func ForLocalInspection(db *sql.DB) *Cluster + func ForLocalInspectionWithPreparedStmts(db *sql.DB) (*Cluster, error) + func NewTestCluster(t *testing.T) (*Cluster, func()) + func OpenCluster(closingCtx context.Context, name string, store driver.NodeStore, ...) (*Cluster, error) + func (c *Cluster) Begin() (*sql.Tx, error) + func (c *Cluster) Close() error + func (c *Cluster) DB() *sql.DB + func (c *Cluster) DeleteNetworkPeer(networkID int64, peerID int64) error + func (c *Cluster) EnterExclusive() error + func (c *Cluster) ExitExclusive(ctx context.Context, f func(context.Context, *ClusterTx) error) error + func (c *Cluster) GetNetworkPeersTargetNetworkIDs(projectName string, networkType NetworkType) (map[NetworkPeer]int64, error) + func (c *Cluster) GetNodeID() int64 + func (c *Cluster) LocalNodeIsEvacuated() bool + func (c *Cluster) NodeID(id int64) + func (c *Cluster) Transaction(ctx context.Context, f func(context.Context, *ClusterTx) error) error + func (c *Cluster) UpdateNetworkZone(id int64, config *api.NetworkZonePut) error + type ClusterRole string — linux/amd64 + type ClusterTx struct — linux/amd64 + func NewTestClusterTx(t *testing.T) (*ClusterTx, func()) + func (c *ClusterTx) AddImageToLocalNode(ctx context.Context, project, fingerprint string) error + func (c *ClusterTx) AddNodeToClusterGroup(ctx context.Context, groupName string, nodeName string) error + func (c *ClusterTx) BootstrapNode(name string, address string) error + func (c *ClusterTx) ClearNode(ctx context.Context, id int64) error + func (c *ClusterTx) Config(ctx context.Context) (map[string]string, error) + func (c *ClusterTx) CopyDefaultImageProfiles(ctx context.Context, id int, newID int) error + func (c *ClusterTx) CreateImage(ctx context.Context, project string, fp string, fname string, sz int64, ...) error + func (c *ClusterTx) CreateImageAlias(ctx context.Context, projectName, aliasName string, imageID int, desc string) error + func (c *ClusterTx) CreateImageSource(ctx context.Context, id int, server string, protocol string, ...) error + func (c *ClusterTx) CreateInstanceBackup(ctx context.Context, args InstanceBackup) error + func (c *ClusterTx) CreateInstanceConfig(ctx context.Context, id int, config map[string]string) error + func (c *ClusterTx) CreateNetwork(ctx context.Context, projectName string, name string, description string, ...) (int64, error) + func (c *ClusterTx) CreateNetworkACL(ctx context.Context, projectName string, info *api.NetworkACLsPost) (int64, error) + func (c *ClusterTx) CreateNetworkConfig(networkID, nodeID int64, config map[string]string) error + func (c *ClusterTx) CreateNetworkForward(ctx context.Context, networkID int64, memberSpecific bool, ...) (int64, error) + func (c *ClusterTx) CreateNetworkLoadBalancer(ctx context.Context, networkID int64, memberSpecific bool, ...) (int64, error) + func (c *ClusterTx) CreateNetworkPeer(ctx context.Context, networkID int64, info *api.NetworkPeersPost) (int64, bool, error) + func (c *ClusterTx) CreateNetworkZone(ctx context.Context, projectName string, info *api.NetworkZonesPost) (int64, error) + func (c *ClusterTx) CreateNetworkZoneRecord(ctx context.Context, zone int64, info api.NetworkZoneRecordsPost) (int64, error) + func (c *ClusterTx) CreateNode(name string, address string) (int64, error) + func (c *ClusterTx) CreateNodeWithArch(name string, address string, arch int) (int64, error) + func (c *ClusterTx) CreatePendingNetwork(ctx context.Context, node string, projectName string, name string, ...) error + func (c *ClusterTx) CreatePendingStoragePool(ctx context.Context, node string, name string, driver string, ...) error + func (c *ClusterTx) CreateStoragePool(ctx context.Context, poolName string, poolDescription string, ...) (int64, error) + func (c *ClusterTx) CreateStoragePoolBucket(ctx context.Context, poolID int64, projectName string, memberSpecific bool, ...) (int64, error) + func (c *ClusterTx) CreateStoragePoolBucketBackup(ctx context.Context, args StoragePoolBucketBackup) error + func (c *ClusterTx) CreateStoragePoolBucketKey(ctx context.Context, bucketID int64, info api.StorageBucketKeysPost) (int64, error) + func (c *ClusterTx) CreateStoragePoolConfig(poolID, nodeID int64, config map[string]string) error + func (c *ClusterTx) CreateStoragePoolVolume(ctx context.Context, projectName string, volumeName string, ...) (int64, error) + func (c *ClusterTx) CreateStoragePoolVolumeBackup(ctx context.Context, args StoragePoolVolumeBackup) error + func (c *ClusterTx) CreateStorageVolumeSnapshot(ctx context.Context, projectName string, volumeName string, ...) (int64, error) + func (c *ClusterTx) DeleteImage(ctx context.Context, id int) error + func (c *ClusterTx) DeleteImageAlias(ctx context.Context, projectName string, name string) error + func (c *ClusterTx) DeleteInstance(ctx context.Context, project, name string) error + func (c *ClusterTx) DeleteInstanceBackup(ctx context.Context, name string) error + func (c *ClusterTx) DeleteInstanceConfigKey(ctx context.Context, id int64, key string) error + func (c *ClusterTx) DeleteNetwork(ctx context.Context, project string, name string) error + func (c *ClusterTx) DeleteNetworkACL(ctx context.Context, id int64) error + func (c *ClusterTx) DeleteNetworkForward(ctx context.Context, networkID int64, forwardID int64) error + func (c *ClusterTx) DeleteNetworkLoadBalancer(ctx context.Context, networkID int64, loadBalancerID int64) error + func (c *ClusterTx) DeleteNetworkZone(ctx context.Context, id int64) error + func (c *ClusterTx) DeleteNetworkZoneRecord(ctx context.Context, id int64) error + func (c *ClusterTx) DeleteReadyStateFromLocalInstances(ctx context.Context) error + func (c *ClusterTx) DeleteStoragePoolBucket(ctx context.Context, poolID int64, bucketID int64) error + func (c *ClusterTx) DeleteStoragePoolBucketBackup(ctx context.Context, name string) error + func (c *ClusterTx) DeleteStoragePoolBucketKey(ctx context.Context, bucketID int64, keyID int64) error + func (c *ClusterTx) DeleteStoragePoolVolumeBackup(ctx context.Context, name string) error + func (c *ClusterTx) GetAllNodesWithOperations(ctx context.Context) ([]string, error) + func (c *ClusterTx) GetCachedImageSourceFingerprint(ctx context.Context, server string, protocol string, alias string, ...) (string, error) + func (c *ClusterTx) GetCandidateMembers(ctx context.Context, allMembers []NodeInfo, targetArchitectures []int, ...) ([]NodeInfo, error) + func (c *ClusterTx) GetClusterGroupNodes(ctx context.Context, groupName string) ([]string, error) + func (c *ClusterTx) GetClusterGroupURIs(ctx context.Context, filter cluster.ClusterGroupFilter) ([]string, error) + func (c *ClusterTx) GetClusterGroupsWithNode(ctx context.Context, nodeName string) ([]string, error) + func (c *ClusterTx) GetCreatedNetworkNamesByProject(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetCreatedNetworks(ctx context.Context) (map[string]map[int64]api.Network, error) + func (c *ClusterTx) GetCreatedNetworksByProject(ctx context.Context, projectName string) (map[int64]api.Network, error) + func (c *ClusterTx) GetCreatedStoragePoolNames(ctx context.Context) ([]string, error) + func (c *ClusterTx) GetCustomVolumesInProject(ctx context.Context, project string) ([]StorageVolumeArgs, error) + func (c *ClusterTx) GetExpiredInstanceBackups(ctx context.Context) ([]InstanceBackup, error) + func (c *ClusterTx) GetExpiredStorageBucketBackups(ctx context.Context) ([]StoragePoolBucketBackup, error) + func (c *ClusterTx) GetExpiredStorageVolumeBackups(ctx context.Context) ([]StoragePoolVolumeBackup, error) + func (c *ClusterTx) GetExpiredStorageVolumeSnapshots(ctx context.Context, memberSpecific bool) ([]StorageVolumeArgs, error) + func (c *ClusterTx) GetFailureDomainsNames(ctx context.Context) (map[uint64]string, error) + func (c *ClusterTx) GetImage(ctx context.Context, fingerprintPrefix string, filter cluster.ImageFilter) (int, *api.Image, error) + func (c *ClusterTx) GetImageAlias(ctx context.Context, projectName string, imageName string, ...) (int, api.ImageAliasesEntry, error) + func (c *ClusterTx) GetImageAliases(ctx context.Context, projectName string) ([]string, error) + func (c *ClusterTx) GetImageByFingerprintPrefix(ctx context.Context, fingerprintPrefix string, filter cluster.ImageFilter) (int, *api.Image, error) + func (c *ClusterTx) GetImageFromAnyProject(ctx context.Context, fingerprint string) (int, *api.Image, error) + func (c *ClusterTx) GetImageSource(ctx context.Context, imageID int) (int, api.ImageSource, error) + func (c *ClusterTx) GetImages(ctx context.Context) (map[string][]string, error) + func (c *ClusterTx) GetImagesFingerprints(ctx context.Context, projectName string, publicOnly bool) ([]string, error) + func (c *ClusterTx) GetImagesOnLocalNode(ctx context.Context) (map[string][]string, error) + func (c *ClusterTx) GetImagesOnNode(ctx context.Context, id int64) (map[string][]string, error) + func (c *ClusterTx) GetInstanceBackup(ctx context.Context, projectName string, name string) (InstanceBackup, error) + func (c *ClusterTx) GetInstanceBackupWithID(ctx context.Context, backupID int) (InstanceBackup, error) + func (c *ClusterTx) GetInstanceBackups(ctx context.Context, projectName string, name string) ([]string, error) + func (c *ClusterTx) GetInstanceConfig(ctx context.Context, id int, key string) (string, error) + func (c *ClusterTx) GetInstanceID(ctx context.Context, project, name string) (int, error) + func (c *ClusterTx) GetInstanceNames(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetInstancePool(ctx context.Context, projectName string, instanceName string) (string, error) + func (c *ClusterTx) GetInstanceProjectAndName(ctx context.Context, id int) (string, string, error) + func (c *ClusterTx) GetInstanceSnapshotID(ctx context.Context, project, instance, name string) (int, error) + func (c *ClusterTx) GetInstanceSnapshotsNames(ctx context.Context, project, name string) ([]string, error) + func (c *ClusterTx) GetInstanceSnapshotsWithName(ctx context.Context, project string, name string) ([]cluster.Instance, error) + func (c *ClusterTx) GetInstancesByMemberAddress(ctx context.Context, offlineThreshold time.Duration, projects []string, ...) (map[string][]Instance, error) + func (c *ClusterTx) GetInstancesWithProfile(ctx context.Context, project, profile string) (map[string][]string, error) + func (c *ClusterTx) GetLocalExpiredInstanceSnapshots(ctx context.Context) ([]cluster.InstanceSnapshot, error) + func (c *ClusterTx) GetLocalImagesFingerprints(ctx context.Context) ([]string, error) + func (c *ClusterTx) GetLocalInstanceWithVsockID(ctx context.Context, vsockID int) (*cluster.Instance, error) + func (c *ClusterTx) GetLocalInstancesInProject(ctx context.Context, filter cluster.InstanceFilter) ([]cluster.Instance, error) + func (c *ClusterTx) GetLocalNodeAddress(ctx context.Context) (string, error) + func (c *ClusterTx) GetLocalNodeName(ctx context.Context) (string, error) + func (c *ClusterTx) GetLocalStoragePoolVolumeSnapshotsWithType(ctx context.Context, projectName string, volumeName string, volumeType int, ...) ([]StorageVolumeArgs, error) + func (c *ClusterTx) GetNetworkACL(ctx context.Context, projectName string, name string) (int64, *api.NetworkACL, error) + func (c *ClusterTx) GetNetworkACLIDsByNames(ctx context.Context, project string) (map[string]int64, error) + func (c *ClusterTx) GetNetworkACLNameAndProjectWithID(ctx context.Context, networkACLID int) (string, string, error) + func (c *ClusterTx) GetNetworkACLURIs(ctx context.Context, projectID int, project string) ([]string, error) + func (c *ClusterTx) GetNetworkACLs(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetNetworkForward(ctx context.Context, networkID int64, memberSpecific bool, ...) (int64, *api.NetworkForward, error) + func (c *ClusterTx) GetNetworkForwardListenAddresses(ctx context.Context, networkID int64, memberSpecific bool) (map[int64]string, error) + func (c *ClusterTx) GetNetworkForwards(ctx context.Context, networkID int64, memberSpecific bool, ...) (map[int64]*api.NetworkForward, error) + func (c *ClusterTx) GetNetworkID(ctx context.Context, projectName string, name string) (int64, error) + func (c *ClusterTx) GetNetworkInAnyState(ctx context.Context, projectName string, networkName string) (int64, *api.Network, map[int64]NetworkNode, error) + func (c *ClusterTx) GetNetworkLoadBalancer(ctx context.Context, networkID int64, memberSpecific bool, ...) (int64, *api.NetworkLoadBalancer, error) + func (c *ClusterTx) GetNetworkLoadBalancerListenAddresses(ctx context.Context, networkID int64, memberSpecific bool) (map[int64]string, error) + func (c *ClusterTx) GetNetworkLoadBalancers(ctx context.Context, networkID int64, memberSpecific bool, ...) (map[int64]*api.NetworkLoadBalancer, error) + func (c *ClusterTx) GetNetworkNameAndProjectWithID(ctx context.Context, networkID int) (string, string, error) + func (c *ClusterTx) GetNetworkPeer(ctx context.Context, networkID int64, peerName string) (int64, *api.NetworkPeer, error) + func (c *ClusterTx) GetNetworkPeerNames(ctx context.Context, networkID int64) (map[int64]string, error) + func (c *ClusterTx) GetNetworkPeers(ctx context.Context, networkID int64) (map[int64]*api.NetworkPeer, error) + func (c *ClusterTx) GetNetworkPeersURLByIntegration(ctx context.Context, networkIntegration string) ([]string, error) + func (c *ClusterTx) GetNetworkURIs(ctx context.Context, projectID int, project string) ([]string, error) + func (c *ClusterTx) GetNetworkZone(ctx context.Context, name string) (int64, string, *api.NetworkZone, error) + func (c *ClusterTx) GetNetworkZoneByProject(ctx context.Context, projectName string, name string) (int64, *api.NetworkZone, error) + func (c *ClusterTx) GetNetworkZoneKeys(ctx context.Context) (map[string]string, error) + func (c *ClusterTx) GetNetworkZoneRecord(ctx context.Context, zone int64, name string) (int64, *api.NetworkZoneRecord, error) + func (c *ClusterTx) GetNetworkZoneRecordNames(ctx context.Context, zone int64) ([]string, error) + func (c *ClusterTx) GetNetworkZones(ctx context.Context) (map[string]string, error) + func (c *ClusterTx) GetNetworkZonesByProject(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetNetworks(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetNetworksLocalConfig(ctx context.Context) (map[string]map[string]string, error) + func (c *ClusterTx) GetNextInstanceSnapshotIndex(ctx context.Context, project string, name string, pattern string) int + func (c *ClusterTx) GetNextStorageVolumeSnapshotIndex(ctx context.Context, pool, name string, typ int, pattern string) int + func (c *ClusterTx) GetNodeAddressOfInstance(ctx context.Context, project string, name string, instType instancetype.Type) (string, error) + func (c *ClusterTx) GetNodeByAddress(ctx context.Context, address string) (NodeInfo, error) + func (c *ClusterTx) GetNodeByName(ctx context.Context, name string) (NodeInfo, error) + func (c *ClusterTx) GetNodeFailureDomain(ctx context.Context, id int64) (string, error) + func (c *ClusterTx) GetNodeID() int64 + func (c *ClusterTx) GetNodeMaxVersion(ctx context.Context) ([2]int, error) + func (c *ClusterTx) GetNodeOfflineThreshold(ctx context.Context) (time.Duration, error) + func (c *ClusterTx) GetNodeWithID(ctx context.Context, nodeID int) (NodeInfo, error) + func (c *ClusterTx) GetNodeWithLeastInstances(ctx context.Context, members []NodeInfo) (*NodeInfo, error) + func (c *ClusterTx) GetNodes(ctx context.Context) ([]NodeInfo, error) + func (c *ClusterTx) GetNodesCount(ctx context.Context) (int, error) + func (c *ClusterTx) GetNodesFailureDomains(ctx context.Context) (map[string]uint64, error) + func (c *ClusterTx) GetNodesWithImage(ctx context.Context, fingerprint string) ([]string, error) + func (c *ClusterTx) GetNodesWithImageAndAutoUpdate(ctx context.Context, fingerprint string, autoUpdate bool) ([]string, error) + func (c *ClusterTx) GetNodesWithOperations(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetNodesWithoutImage(ctx context.Context, fingerprint string) ([]string, error) + func (c *ClusterTx) GetNonPendingNetworkIDs(ctx context.Context) (map[string]map[string]int64, error) + func (c *ClusterTx) GetNonPendingStoragePoolsNamesToIDs(ctx context.Context) (map[string]int64, error) + func (c *ClusterTx) GetOperationsOfType(ctx context.Context, projectName string, opType operationtype.Type) ([]cluster.Operation, error) + func (c *ClusterTx) GetPendingNodeByAddress(ctx context.Context, address string) (NodeInfo, error) + func (c *ClusterTx) GetPoolNamesFromIDs(ctx context.Context, poolIDs []int64) ([]string, error) + func (c *ClusterTx) GetPoolsWithImage(ctx context.Context, imageFingerprint string) ([]int64, error) + func (c *ClusterTx) GetProfile(ctx context.Context, project, name string) (int64, *api.Profile, error) + func (c *ClusterTx) GetProfileNames(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetProfiles(ctx context.Context, projectName string, profileNames []string) ([]api.Profile, error) + func (c *ClusterTx) GetProjectNetworkForwardListenAddressesByUplink(ctx context.Context, uplinkNetworkName string, memberSpecific bool) (map[string]map[string][]string, error) + func (c *ClusterTx) GetProjectNetworkForwardListenAddressesOnMember(ctx context.Context) (map[string]map[int64][]string, error) + func (c *ClusterTx) GetProjectNetworkLoadBalancerListenAddressesByUplink(ctx context.Context, uplinkNetworkName string, memberSpecific bool) (map[string]map[string][]string, error) + func (c *ClusterTx) GetProjectNetworkLoadBalancerListenAddressesOnMember(ctx context.Context) (map[string]map[int64][]string, error) + func (c *ClusterTx) GetProjectsUsingImage(ctx context.Context, fingerprint string) ([]string, error) + func (c *ClusterTx) GetStoragePool(ctx context.Context, poolName string) (int64, *api.StoragePool, map[int64]StoragePoolNode, error) + func (c *ClusterTx) GetStoragePoolBucket(ctx context.Context, poolID int64, projectName string, memberSpecific bool, ...) (*StorageBucket, error) + func (c *ClusterTx) GetStoragePoolBucketBackup(ctx context.Context, projectName string, poolName string, backupName string) (StoragePoolBucketBackup, error) + func (c *ClusterTx) GetStoragePoolBucketBackupsName(ctx context.Context, projectName string, bucketName string) ([]string, error) + func (c *ClusterTx) GetStoragePoolBucketKey(ctx context.Context, bucketID int64, keyName string) (*StorageBucketKey, error) + func (c *ClusterTx) GetStoragePoolBucketKeys(ctx context.Context, bucketID int64, filters ...StorageBucketKeyFilter) ([]*StorageBucketKey, error) + func (c *ClusterTx) GetStoragePoolBucketWithID(ctx context.Context, bucketID int) (StorageBucket, error) + func (c *ClusterTx) GetStoragePoolBuckets(ctx context.Context, memberSpecific bool, filters ...StorageBucketFilter) ([]*StorageBucket, error) + func (c *ClusterTx) GetStoragePoolDriver(ctx context.Context, id int64) (string, error) + func (c *ClusterTx) GetStoragePoolDrivers(ctx context.Context) ([]string, error) + func (c *ClusterTx) GetStoragePoolID(ctx context.Context, name string) (int64, error) + func (c *ClusterTx) GetStoragePoolInAnyState(ctx context.Context, poolName string) (int64, *api.StoragePool, map[int64]StoragePoolNode, error) + func (c *ClusterTx) GetStoragePoolLocalBucket(ctx context.Context, bucketName string) (*StorageBucket, error) + func (c *ClusterTx) GetStoragePoolLocalBucketByAccessKey(ctx context.Context, accessKey string) (*StorageBucket, error) + func (c *ClusterTx) GetStoragePoolNames(ctx context.Context) ([]string, error) + func (c *ClusterTx) GetStoragePoolNodeConfigs(ctx context.Context, poolID int64) (map[string]map[string]string, error) + func (c *ClusterTx) GetStoragePoolNodeVolumeID(ctx context.Context, projectName string, volumeName string, volumeType int, ...) (int64, error) + func (c *ClusterTx) GetStoragePoolVolume(ctx context.Context, poolID int64, projectName string, volumeType int, ...) (*StorageVolume, error) + func (c *ClusterTx) GetStoragePoolVolumeBackup(ctx context.Context, projectName string, poolName string, backupName string) (StoragePoolVolumeBackup, error) + func (c *ClusterTx) GetStoragePoolVolumeBackupWithID(ctx context.Context, backupID int) (StoragePoolVolumeBackup, error) + func (c *ClusterTx) GetStoragePoolVolumeBackups(ctx context.Context, projectName string, volumeName string, poolID int64) ([]StoragePoolVolumeBackup, error) + func (c *ClusterTx) GetStoragePoolVolumeBackupsNames(ctx context.Context, projectName string, volumeName string, poolID int64) ([]string, error) + func (c *ClusterTx) GetStoragePoolVolumeWithID(ctx context.Context, volumeID int) (StorageVolumeArgs, error) + func (c *ClusterTx) GetStoragePoolVolumes(ctx context.Context, poolID int64, memberSpecific bool, ...) ([]*StorageVolume, error) + func (c *ClusterTx) GetStoragePoolVolumesWithType(ctx context.Context, volumeType int, memberSpecific bool) ([]StorageVolumeArgs, error) + func (c *ClusterTx) GetStoragePoolWithID(ctx context.Context, poolID int) (int64, *api.StoragePool, map[int64]StoragePoolNode, error) + func (c *ClusterTx) GetStoragePools(ctx context.Context, state *StoragePoolState, poolNames ...string) (map[int64]api.StoragePool, map[int64]map[int64]StoragePoolNode, error) + func (c *ClusterTx) GetStoragePoolsLocalConfig(ctx context.Context) (map[string]map[string]string, error) + func (c *ClusterTx) GetStorageVolumeNodes(ctx context.Context, poolID int64, projectName string, volumeName string, ...) ([]NodeInfo, error) + func (c *ClusterTx) GetStorageVolumeSnapshotExpiry(ctx context.Context, volumeID int64) (time.Time, error) + func (c *ClusterTx) GetStorageVolumeSnapshotWithID(ctx context.Context, snapshotID int) (StorageVolumeArgs, error) + func (c *ClusterTx) GetStorageVolumeURIs(ctx context.Context, project string) ([]string, error) + func (c *ClusterTx) GetURIFromEntity(ctx context.Context, entityType int, entityID int) (string, error) + func (c *ClusterTx) ImageExists(ctx context.Context, project string, fingerprint string) (bool, error) + func (c *ClusterTx) ImageIsReferencedByOtherProjects(ctx context.Context, project string, fingerprint string) (bool, error) + func (c *ClusterTx) InstanceList(ctx context.Context, ...) error + func (c *ClusterTx) InstancesToInstanceArgs(ctx context.Context, fillProfiles bool, instances ...cluster.Instance) (map[int]InstanceArgs, error) + func (c *ClusterTx) IsRemoteStorage(ctx context.Context, poolID int64) (bool, error) + func (c *ClusterTx) LocateImage(ctx context.Context, fingerprint string) (string, error) + func (c *ClusterTx) MoveImageAlias(ctx context.Context, source int, destination int) error + func (c *ClusterTx) NetworkCreated(project string, name string) error + func (c *ClusterTx) NetworkErrored(project string, name string) error + func (c *ClusterTx) NetworkNodeConfigs(ctx context.Context, networkID int64) (map[string]map[string]string, error) + func (c *ClusterTx) NetworkNodeCreated(networkID int64) error + func (c *ClusterTx) NetworkNodeJoin(networkID, nodeID int64) error + func (c *ClusterTx) NetworkNodes(ctx context.Context, networkID int64) (map[int64]NetworkNode, error) + func (c *ClusterTx) NodeID(id int64) + func (c *ClusterTx) NodeIsEmpty(ctx context.Context, id int64) (string, error) + func (c *ClusterTx) NodeIsOutdated(ctx context.Context) (bool, error) + func (c *ClusterTx) RemoveNode(id int64) error + func (c *ClusterTx) RemoveNodeFromClusterGroup(ctx context.Context, groupName string, nodeName string) error + func (c *ClusterTx) RemoveStoragePool(ctx context.Context, poolName string) (*api.StoragePool, error) + func (c *ClusterTx) RemoveStoragePoolVolume(ctx context.Context, projectName string, volumeName string, volumeType int, ...) error + func (c *ClusterTx) RemoveUnreferencedProfiles(ctx context.Context) error + func (c *ClusterTx) RenameBucketBackup(ctx context.Context, oldName, newName string) error + func (c *ClusterTx) RenameImageAlias(ctx context.Context, id int, name string) error + func (c *ClusterTx) RenameInstanceBackup(ctx context.Context, oldName, newName string) error + func (c *ClusterTx) RenameNetwork(ctx context.Context, project string, oldName string, newName string) error + func (c *ClusterTx) RenameNetworkACL(ctx context.Context, id int64, newName string) error + func (c *ClusterTx) RenameNode(ctx context.Context, old string, new string) error + func (c *ClusterTx) RenameStoragePoolVolume(ctx context.Context, projectName string, oldVolumeName string, ...) error + func (c *ClusterTx) RenameVolumeBackup(ctx context.Context, oldName, newName string) error + func (c *ClusterTx) SetDescription(id int64, description string) error + func (c *ClusterTx) SetImageCachedAndLastUseDate(ctx context.Context, projectName string, fingerprint string, ...) error + func (c *ClusterTx) SetNodeHeartbeat(address string, heartbeat time.Time) error + func (c *ClusterTx) SetNodePendingFlag(id int64, pending bool) error + func (c *ClusterTx) SetNodeVersion(id int64, version [2]int) error + func (c *ClusterTx) StoragePoolCreated(name string) error + func (c *ClusterTx) StoragePoolErrored(name string) error + func (c *ClusterTx) StoragePoolNodeCreated(poolID int64) error + func (c *ClusterTx) Tx() *sql.Tx + func (c *ClusterTx) UpdateClusterConfig(values map[string]string) error + func (c *ClusterTx) UpdateImage(ctx context.Context, id int, fname string, sz int64, public bool, ...) error + func (c *ClusterTx) UpdateImageAlias(ctx context.Context, aliasID int, imageID int, desc string) error + func (c *ClusterTx) UpdateImageLastUseDate(ctx context.Context, projectName string, fingerprint string, ...) error + func (c *ClusterTx) UpdateInstanceConfig(id int, values map[string]string) error + func (c *ClusterTx) UpdateInstanceLastUsedDate(id int, date time.Time) error + func (c *ClusterTx) UpdateInstanceNode(ctx context.Context, project string, oldName string, newName string, ...) error + func (c *ClusterTx) UpdateInstancePowerState(id int, state string) error + func (c *ClusterTx) UpdateInstanceSnapshot(id int, description string, expiryDate time.Time) error + func (c *ClusterTx) UpdateInstanceSnapshotConfig(id int, values map[string]string) error + func (c *ClusterTx) UpdateInstanceSnapshotCreationDate(ctx context.Context, instanceID int, date time.Time) error + func (c *ClusterTx) UpdateInstanceStatefulFlag(ctx context.Context, id int, stateful bool) error + func (c *ClusterTx) UpdateNetwork(ctx context.Context, project string, name, description string, ...) error + func (c *ClusterTx) UpdateNetworkACL(ctx context.Context, id int64, config *api.NetworkACLPut) error + func (c *ClusterTx) UpdateNetworkForward(ctx context.Context, networkID int64, forwardID int64, ...) error + func (c *ClusterTx) UpdateNetworkLoadBalancer(ctx context.Context, networkID int64, loadBalancerID int64, ...) error + func (c *ClusterTx) UpdateNetworkPeer(ctx context.Context, networkID int64, peerID int64, info *api.NetworkPeerPut) error + func (c *ClusterTx) UpdateNetworkZoneRecord(ctx context.Context, id int64, config api.NetworkZoneRecordPut) error + func (c *ClusterTx) UpdateNodeClusterGroups(ctx context.Context, id int64, groups []string) error + func (c *ClusterTx) UpdateNodeConfig(ctx context.Context, id int64, config map[string]string) error + func (c *ClusterTx) UpdateNodeFailureDomain(ctx context.Context, id int64, domain string) error + func (c *ClusterTx) UpdateNodeRoles(id int64, roles []ClusterRole) error + func (c *ClusterTx) UpdateNodeStatus(id int64, state int) error + func (c *ClusterTx) UpdateRemoteStoragePoolAfterNodeJoin(ctx context.Context, poolID int64, nodeID int64) error + func (c *ClusterTx) UpdateStoragePool(ctx context.Context, poolName, description string, ...) error + func (c *ClusterTx) UpdateStoragePoolAfterNodeJoin(poolID, nodeID int64) error + func (c *ClusterTx) UpdateStoragePoolBucket(ctx context.Context, poolID int64, bucketID int64, info *api.StorageBucketPut) error + func (c *ClusterTx) UpdateStoragePoolBucketKey(ctx context.Context, bucketID int64, bucketKeyID int64, ...) error + func (c *ClusterTx) UpdateStoragePoolVolume(ctx context.Context, projectName string, volumeName string, volumeType int, ...) error + func (c *ClusterTx) UpdateStorageVolumeNode(ctx context.Context, projectName string, oldName string, newName string, ...) error + func (c *ClusterTx) UpdateStorageVolumeSnapshot(ctx context.Context, projectName string, volumeName string, volumeType int, ...) error + func (c *ClusterTx) UpdateWarningState(UUID string, message string, status warningtype.Status) error + func (c *ClusterTx) UpdateWarningStatus(UUID string, status warningtype.Status) error + func (c *ClusterTx) UpsertWarning(ctx context.Context, nodeName string, projectName string, entityTypeCode int, ...) error + func (c *ClusterTx) UpsertWarningLocalNode(ctx context.Context, projectName string, entityTypeCode int, entityID int, ...) error + type DB struct — linux/amd64 + Cluster *Cluster + Node *Node + func (db *DB) GetProject(ctx context.Context, projectName string) (*cluster.Project, error) + func (db *DB) UpdateCertificate(ctx context.Context, fingerprint string, cert cluster.Certificate, ...) error + type Instance struct — linux/amd64 + ID int64 + Location string + Name string + Project string + Type instancetype.Type + type InstanceArgs struct — linux/amd64 + Architecture int + BaseImage string + Config map[string]string + CreationDate time.Time + Description string + Devices deviceConfig.Devices + Ephemeral bool + ExpiryDate time.Time + ID int + LastUsedDate time.Time + Name string + Node string + Profiles []api.Profile + Project string + Snapshot bool + Stateful bool + Type instancetype.Type + type InstanceBackup struct — linux/amd64 + CompressionAlgorithm string + CreationDate time.Time + ExpiryDate time.Time + ID int + InstanceID int + InstanceOnly bool + Name string + OptimizedStorage bool + type NetworkNode struct — linux/amd64 + ID int64 + Name string + State NetworkState + type NetworkPeer struct — linux/amd64 + NetworkName string + PeerName string + type NetworkState int — linux/amd64 + type NetworkType int — linux/amd64 + const NetworkTypeBridge + const NetworkTypeMacvlan + const NetworkTypeOVN + const NetworkTypePhysical + const NetworkTypeSriov + type Node struct — linux/amd64 + func DirectAccess(db *sql.DB) *Node + func NewTestNode(t *testing.T) (*Node, func()) + func OpenNode(dir string, fresh func(*Node) error) (*Node, error) + func (n *Node) Close() error + func (n *Node) DB() *sql.DB + func (n *Node) Dir() string + func (n *Node) GetAppliedPatches() ([]string, error) + func (n *Node) MarkPatchAsApplied(patch string) error + func (n *Node) Transaction(ctx context.Context, f func(context.Context, *NodeTx) error) error + type NodeInfo struct — linux/amd64 + APIExtensions int + Address string + Architecture int + Config map[string]string + Description string + Groups []string + Heartbeat time.Time + ID int64 + Name string + Roles []ClusterRole + Schema int + State int + func (n NodeInfo) IsOffline(threshold time.Duration) bool + func (n NodeInfo) ToAPI(ctx context.Context, tx *ClusterTx, args NodeInfoArgs) (*api.ClusterMember, error) + func (n NodeInfo) Version() [2]int + type NodeInfoArgs struct — linux/amd64 + FailureDomains map[uint64]string + LeaderAddress string + MaxMemberVersion [2]int + MemberFailureDomains map[string]uint64 + OfflineThreshold time.Duration + RaftNodes []RaftNode + type NodeTx struct — linux/amd64 + func NewTestNodeTx(t *testing.T) (*NodeTx, func()) + func (n *NodeTx) Config(ctx context.Context) (map[string]string, error) + func (n *NodeTx) CreateFirstRaftNode(address string, name string) error + func (n *NodeTx) CreateRaftNode(address string, name string) (int64, error) + func (n *NodeTx) GetCertificates(ctx context.Context) ([]cluster.Certificate, error) + func (n *NodeTx) GetRaftNodeAddress(ctx context.Context, id int64) (string, error) + func (n *NodeTx) GetRaftNodeAddresses(ctx context.Context) ([]string, error) + func (n *NodeTx) GetRaftNodes(ctx context.Context) ([]RaftNode, error) + func (n *NodeTx) RemoveRaftNode(id int64) error + func (n *NodeTx) ReplaceCertificates(certs []cluster.Certificate) error + func (n *NodeTx) ReplaceRaftNodes(nodes []RaftNode) error + func (n *NodeTx) UpdateConfig(values map[string]string) error + type RaftNode struct — linux/amd64 + Name string + type RaftRole = client.NodeRole — linux/amd64 + type StorageBucket struct — linux/amd64 + ID int64 + PoolID int64 + PoolName string + Project string + type StorageBucketFilter struct — linux/amd64 + Name *string + PoolID *int64 + PoolName *string + Project *string + type StorageBucketKey struct — linux/amd64 + ID int64 + type StorageBucketKeyFilter struct — linux/amd64 + Name *string + type StoragePoolBucketBackup struct — linux/amd64 + BucketID int64 + CompressionAlgorithm string + CreationDate time.Time + ExpiryDate time.Time + ID int + Name string + type StoragePoolNode struct — linux/amd64 + ID int64 + Name string + State StoragePoolState + type StoragePoolState int — linux/amd64 + const StoragePoolCreated + const StoragePoolPending + type StoragePoolVolumeBackup struct — linux/amd64 + CompressionAlgorithm string + CreationDate time.Time + ExpiryDate time.Time + ID int + Name string + OptimizedStorage bool + VolumeID int64 + VolumeOnly bool + type StorageVolume struct — linux/amd64 + ID int64 + type StorageVolumeArgs struct — linux/amd64 + Config map[string]string + ContentType string + CreationDate time.Time + Description string + ExpiryDate time.Time + ID int64 + Name string + NodeID int64 + PoolID int64 + PoolName string + ProjectID int64 + ProjectName string + Snapshot bool + Type int + TypeName string + type StorageVolumeFilter struct — linux/amd64 + Name *string + Project *string + Type *int Other modules containing this package github.com/lxc/incus