Documentation ¶
Overview ¶
Package configagent implements Config Agent gRPC interface.
Index ¶
- Variables
- type ConfigServer
- func (s *ConfigServer) BootstrapDatabase(ctx context.Context, req *pb.BootstrapDatabaseRequest) (*lropb.Operation, error)
- func (s *ConfigServer) BootstrapStandby(ctx context.Context, req *pb.BootstrapStandbyRequest) (*pb.BootstrapStandbyResponse, error)
- func (s *ConfigServer) BounceDatabase(ctx context.Context, req *pb.BounceDatabaseRequest) (*pb.BounceDatabaseResponse, error)
- func (s *ConfigServer) CheckStatus(ctx context.Context, req *pb.CheckStatusRequest) (*pb.CheckStatusResponse, error)
- func (s *ConfigServer) CreateCDB(ctx context.Context, req *pb.CreateCDBRequest) (*lropb.Operation, error)
- func (s *ConfigServer) CreateCDBUser(ctx context.Context, req *pb.CreateCDBUserRequest) (*pb.CreateCDBUserResponse, error)
- func (s *ConfigServer) CreateDatabase(ctx context.Context, req *pb.CreateDatabaseRequest) (*pb.CreateDatabaseResponse, error)
- func (s *ConfigServer) CreateListener(ctx context.Context, req *pb.CreateListenerRequest) (*pb.CreateListenerResponse, error)
- func (s *ConfigServer) CreateUsers(ctx context.Context, req *pb.CreateUsersRequest) (*pb.CreateUsersResponse, error)
- func (s *ConfigServer) DataPumpExport(ctx context.Context, req *pb.DataPumpExportRequest) (*lropb.Operation, error)
- func (s *ConfigServer) DataPumpImport(ctx context.Context, req *pb.DataPumpImportRequest) (*lropb.Operation, error)
- func (s *ConfigServer) DeleteOperation(ctx context.Context, req *lropb.DeleteOperationRequest) (*empty.Empty, error)
- func (s *ConfigServer) FetchServiceImageMetaData(ctx context.Context, req *pb.FetchServiceImageMetaDataRequest) (*pb.FetchServiceImageMetaDataResponse, error)
- func (s *ConfigServer) GetOperation(ctx context.Context, req *lropb.GetOperationRequest) (*lropb.Operation, error)
- func (s *ConfigServer) GetParameterTypeValue(ctx context.Context, req *pb.GetParameterTypeValueRequest) (*pb.GetParameterTypeValueResponse, error)
- func (s *ConfigServer) ListOperations(ctx context.Context, req *lropb.ListOperationsRequest) (*lropb.ListOperationsResponse, error)
- func (s *ConfigServer) PhysicalBackup(ctx context.Context, req *pb.PhysicalBackupRequest) (*lropb.Operation, error)
- func (s *ConfigServer) PhysicalRestore(ctx context.Context, req *pb.PhysicalRestoreRequest) (*lropb.Operation, error)
- func (s *ConfigServer) RecoverConfigFile(ctx context.Context, req *pb.RecoverConfigFileRequest) (*pb.RecoverConfigFileResponse, error)
- func (s *ConfigServer) SetParameter(ctx context.Context, req *pb.SetParameterRequest) (*pb.SetParameterResponse, error)
- func (s *ConfigServer) UpdateUsers(ctx context.Context, req *pb.UpdateUsersRequest) (*pb.UpdateUsersResponse, error)
- func (s *ConfigServer) UsersChanged(ctx context.Context, req *pb.UsersChangedRequest) (*pb.UsersChangedResponse, error)
- func (s *ConfigServer) VerifyPhysicalBackup(ctx context.Context, req *pb.VerifyPhysicalBackupRequest) (*pb.VerifyPhysicalBackupResponse, error)
Constants ¶
This section is empty.
Variables ¶
var AccessSecretVersionFunc = func(ctx context.Context, name string) (string, error) { client, closeConn, err := newGsmClient(ctx) if err != nil { return "", fmt.Errorf("configagent/AccessSecretVersionFunc: failed to create secretmanager client: %v", err) } defer closeConn() req := &secretmanagerpb.AccessSecretVersionRequest{ Name: name, } result, err := client.AccessSecretVersion(ctx, req) if err != nil { return "", fmt.Errorf("configagent/AccessSecretVersionFunc: failed to access secret version: %v", err) } return string(result.Payload.Data[:]), nil }
AccessSecretVersionFunc accesses the payload for the given secret version if one exists. The version can be a version number as a string (e.g. "5") or an alias (e.g. "latest").
Functions ¶
This section is empty.
Types ¶
type ConfigServer ¶
type ConfigServer struct { *pb.UnimplementedConfigAgentServer DBService string DBPort int }
ConfigServer represents a ConfigAgentServer
func (*ConfigServer) BootstrapDatabase ¶
func (s *ConfigServer) BootstrapDatabase(ctx context.Context, req *pb.BootstrapDatabaseRequest) (*lropb.Operation, error)
BootstrapDatabase bootstrap a CDB after creation or restore.
func (*ConfigServer) BootstrapStandby ¶
func (s *ConfigServer) BootstrapStandby(ctx context.Context, req *pb.BootstrapStandbyRequest) (*pb.BootstrapStandbyResponse, error)
BootstrapStandby performs bootstrap steps for standby instance.
func (*ConfigServer) BounceDatabase ¶
func (s *ConfigServer) BounceDatabase(ctx context.Context, req *pb.BounceDatabaseRequest) (*pb.BounceDatabaseResponse, error)
BounceDatabase shutdown/startup the database as requested.
func (*ConfigServer) CheckStatus ¶
func (s *ConfigServer) CheckStatus(ctx context.Context, req *pb.CheckStatusRequest) (*pb.CheckStatusResponse, error)
CheckStatus runs a requested set of state checks. The Instance state check consists of:
- checking the provisioning done file.
- running a CDB connection test via DB Daemon.
func (*ConfigServer) CreateCDB ¶
func (s *ConfigServer) CreateCDB(ctx context.Context, req *pb.CreateCDBRequest) (*lropb.Operation, error)
CreateCDB creates a CDB using dbca.
func (*ConfigServer) CreateCDBUser ¶
func (s *ConfigServer) CreateCDBUser(ctx context.Context, req *pb.CreateCDBUserRequest) (*pb.CreateCDBUserResponse, error)
CreateCDBUser creates CDB user as requested.
func (*ConfigServer) CreateDatabase ¶
func (s *ConfigServer) CreateDatabase(ctx context.Context, req *pb.CreateDatabaseRequest) (*pb.CreateDatabaseResponse, error)
CreateDatabase creates PDB as requested.
func (*ConfigServer) CreateListener ¶
func (s *ConfigServer) CreateListener(ctx context.Context, req *pb.CreateListenerRequest) (*pb.CreateListenerResponse, error)
CreateListener invokes dbdaemon.CreateListener.
func (*ConfigServer) CreateUsers ¶
func (s *ConfigServer) CreateUsers(ctx context.Context, req *pb.CreateUsersRequest) (*pb.CreateUsersResponse, error)
CreateUsers creates users as requested.
func (*ConfigServer) DataPumpExport ¶
func (s *ConfigServer) DataPumpExport(ctx context.Context, req *pb.DataPumpExportRequest) (*lropb.Operation, error)
DataPumpExport exports data pump file to GCS path provided.
func (*ConfigServer) DataPumpImport ¶
func (s *ConfigServer) DataPumpImport(ctx context.Context, req *pb.DataPumpImportRequest) (*lropb.Operation, error)
DataPumpImport imports data dump file provided in GCS path.
func (*ConfigServer) DeleteOperation ¶
func (s *ConfigServer) DeleteOperation(ctx context.Context, req *lropb.DeleteOperationRequest) (*empty.Empty, error)
DeleteOperation deletes lro given by name.
func (*ConfigServer) FetchServiceImageMetaData ¶
func (s *ConfigServer) FetchServiceImageMetaData(ctx context.Context, req *pb.FetchServiceImageMetaDataRequest) (*pb.FetchServiceImageMetaDataResponse, error)
FetchServiceImageMetaData fetches the image metadata from the service image.
func (*ConfigServer) GetOperation ¶
func (s *ConfigServer) GetOperation(ctx context.Context, req *lropb.GetOperationRequest) (*lropb.Operation, error)
GetOperation fetches corresponding lro given operation name.
func (*ConfigServer) GetParameterTypeValue ¶
func (s *ConfigServer) GetParameterTypeValue(ctx context.Context, req *pb.GetParameterTypeValueRequest) (*pb.GetParameterTypeValueResponse, error)
GetParameterTypeValue returns parameters' type and value by querying DB.
func (*ConfigServer) ListOperations ¶
func (s *ConfigServer) ListOperations(ctx context.Context, req *lropb.ListOperationsRequest) (*lropb.ListOperationsResponse, error)
ListOperations lists all lro.
func (*ConfigServer) PhysicalBackup ¶
func (s *ConfigServer) PhysicalBackup(ctx context.Context, req *pb.PhysicalBackupRequest) (*lropb.Operation, error)
PhysicalBackup starts an RMAN backup and stores it in the GCS bucket provided.
func (*ConfigServer) PhysicalRestore ¶
func (s *ConfigServer) PhysicalRestore(ctx context.Context, req *pb.PhysicalRestoreRequest) (*lropb.Operation, error)
PhysicalRestore restores an RMAN backup (downloaded from GCS).
func (*ConfigServer) RecoverConfigFile ¶
func (s *ConfigServer) RecoverConfigFile(ctx context.Context, req *pb.RecoverConfigFileRequest) (*pb.RecoverConfigFileResponse, error)
RecoverConfigFile generates the binary spfile from the human readable backup pfile.
func (*ConfigServer) SetParameter ¶
func (s *ConfigServer) SetParameter(ctx context.Context, req *pb.SetParameterRequest) (*pb.SetParameterResponse, error)
SetParameter sets database parameter as requested.
func (*ConfigServer) UpdateUsers ¶
func (s *ConfigServer) UpdateUsers(ctx context.Context, req *pb.UpdateUsersRequest) (*pb.UpdateUsersResponse, error)
UpdateUsers update/create users as requested.
func (*ConfigServer) UsersChanged ¶
func (s *ConfigServer) UsersChanged(ctx context.Context, req *pb.UsersChangedRequest) (*pb.UsersChangedResponse, error)
UsersChanged determines whether there is change on users (update/delete/create).
func (*ConfigServer) VerifyPhysicalBackup ¶
func (s *ConfigServer) VerifyPhysicalBackup(ctx context.Context, req *pb.VerifyPhysicalBackupRequest) (*pb.VerifyPhysicalBackupResponse, error)
VerifyPhysicalBackup verifies the existence of physical backup.