Documentation ¶
Overview ¶
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetEnforcedVolSpecs(locator *api.VolumeLocator, spec *api.VolumeSpec) (*api.VolumeSpec, error)
- func NewAlertsServer(filterDeleter alerts.FilterDeleter) api.OpenStorageAlertsServer
- func ToSdkCloudBackupSchedEnumerateResponse(r *api.CloudBackupSchedEnumerateResponse) *api.SdkCloudBackupSchedEnumerateResponse
- func ToSdkCloudBackupdScheduleInfo(s api.CloudBackupScheduleInfo) *api.SdkCloudBackupScheduleInfo
- type CloudBackupServer
- func (s *CloudBackupServer) Catalog(ctx context.Context, req *api.SdkCloudBackupCatalogRequest) (*api.SdkCloudBackupCatalogResponse, error)
- func (s *CloudBackupServer) Create(ctx context.Context, req *api.SdkCloudBackupCreateRequest) (*api.SdkCloudBackupCreateResponse, error)
- func (s *CloudBackupServer) Delete(ctx context.Context, req *api.SdkCloudBackupDeleteRequest) (*api.SdkCloudBackupDeleteResponse, error)
- func (s *CloudBackupServer) DeleteAll(ctx context.Context, req *api.SdkCloudBackupDeleteAllRequest) (*api.SdkCloudBackupDeleteAllResponse, error)
- func (s *CloudBackupServer) EnumerateWithFilters(ctx context.Context, req *api.SdkCloudBackupEnumerateWithFiltersRequest) (*api.SdkCloudBackupEnumerateWithFiltersResponse, error)
- func (s *CloudBackupServer) History(ctx context.Context, req *api.SdkCloudBackupHistoryRequest) (*api.SdkCloudBackupHistoryResponse, error)
- func (s *CloudBackupServer) Restore(ctx context.Context, req *api.SdkCloudBackupRestoreRequest) (*api.SdkCloudBackupRestoreResponse, error)
- func (s *CloudBackupServer) SchedCreate(ctx context.Context, req *api.SdkCloudBackupSchedCreateRequest) (*api.SdkCloudBackupSchedCreateResponse, error)
- func (s *CloudBackupServer) SchedDelete(ctx context.Context, req *api.SdkCloudBackupSchedDeleteRequest) (*api.SdkCloudBackupSchedDeleteResponse, error)
- func (s *CloudBackupServer) SchedEnumerate(ctx context.Context, req *api.SdkCloudBackupSchedEnumerateRequest) (*api.SdkCloudBackupSchedEnumerateResponse, error)
- func (s *CloudBackupServer) StateChange(ctx context.Context, req *api.SdkCloudBackupStateChangeRequest) (*api.SdkCloudBackupStateChangeResponse, error)
- func (s *CloudBackupServer) Status(ctx context.Context, req *api.SdkCloudBackupStatusRequest) (*api.SdkCloudBackupStatusResponse, error)
- type ClusterPairServer
- func (s *ClusterPairServer) Create(ctx context.Context, req *api.SdkClusterPairCreateRequest) (*api.SdkClusterPairCreateResponse, error)
- func (s *ClusterPairServer) Delete(ctx context.Context, req *api.SdkClusterPairDeleteRequest) (*api.SdkClusterPairDeleteResponse, error)
- func (s *ClusterPairServer) Enumerate(ctx context.Context, req *api.SdkClusterPairEnumerateRequest) (*api.SdkClusterPairEnumerateResponse, error)
- func (s *ClusterPairServer) GetToken(ctx context.Context, req *api.SdkClusterPairGetTokenRequest) (*api.SdkClusterPairGetTokenResponse, error)
- func (s *ClusterPairServer) Inspect(ctx context.Context, req *api.SdkClusterPairInspectRequest) (*api.SdkClusterPairInspectResponse, error)
- func (s *ClusterPairServer) ResetToken(ctx context.Context, req *api.SdkClusterPairResetTokenRequest) (*api.SdkClusterPairResetTokenResponse, error)
- type ClusterServer
- type CredentialServer
- func (s *CredentialServer) Create(ctx context.Context, req *api.SdkCredentialCreateRequest) (*api.SdkCredentialCreateResponse, error)
- func (s *CredentialServer) Delete(ctx context.Context, req *api.SdkCredentialDeleteRequest) (*api.SdkCredentialDeleteResponse, error)
- func (s *CredentialServer) Enumerate(ctx context.Context, req *api.SdkCredentialEnumerateRequest) (*api.SdkCredentialEnumerateResponse, error)
- func (s *CredentialServer) Inspect(ctx context.Context, req *api.SdkCredentialInspectRequest) (*api.SdkCredentialInspectResponse, error)
- func (s *CredentialServer) Validate(ctx context.Context, req *api.SdkCredentialValidateRequest) (*api.SdkCredentialValidateResponse, error)
- type IdentityServer
- type NodeServer
- func (s *NodeServer) Enumerate(ctx context.Context, req *api.SdkNodeEnumerateRequest) (*api.SdkNodeEnumerateResponse, error)
- func (s *NodeServer) Inspect(ctx context.Context, req *api.SdkNodeInspectRequest) (*api.SdkNodeInspectResponse, error)
- func (s *NodeServer) InspectCurrent(ctx context.Context, req *api.SdkNodeInspectCurrentRequest) (*api.SdkNodeInspectCurrentResponse, error)
- type ObjectstoreServer
- func (s *ObjectstoreServer) Create(ctx context.Context, req *api.SdkObjectstoreCreateRequest) (*api.SdkObjectstoreCreateResponse, error)
- func (s *ObjectstoreServer) Delete(ctx context.Context, req *api.SdkObjectstoreDeleteRequest) (*api.SdkObjectstoreDeleteResponse, error)
- func (s *ObjectstoreServer) Inspect(ctx context.Context, req *api.SdkObjectstoreInspectRequest) (*api.SdkObjectstoreInspectResponse, error)
- func (s *ObjectstoreServer) Update(ctx context.Context, req *api.SdkObjectstoreUpdateRequest) (*api.SdkObjectstoreUpdateResponse, error)
- type SchedulePolicyServer
- func (s *SchedulePolicyServer) Create(ctx context.Context, req *api.SdkSchedulePolicyCreateRequest) (*api.SdkSchedulePolicyCreateResponse, error)
- func (s *SchedulePolicyServer) Delete(ctx context.Context, req *api.SdkSchedulePolicyDeleteRequest) (*api.SdkSchedulePolicyDeleteResponse, error)
- func (s *SchedulePolicyServer) Enumerate(ctx context.Context, req *api.SdkSchedulePolicyEnumerateRequest) (*api.SdkSchedulePolicyEnumerateResponse, error)
- func (s *SchedulePolicyServer) Inspect(ctx context.Context, req *api.SdkSchedulePolicyInspectRequest) (*api.SdkSchedulePolicyInspectResponse, error)
- func (s *SchedulePolicyServer) Update(ctx context.Context, req *api.SdkSchedulePolicyUpdateRequest) (*api.SdkSchedulePolicyUpdateResponse, error)
- type SecurityConfig
- type Server
- type ServerConfig
- type TLSConfig
- type VolumeServer
- func (s *VolumeServer) Attach(ctx context.Context, req *api.SdkVolumeAttachRequest) (*api.SdkVolumeAttachResponse, error)
- func (s *VolumeServer) Cancel(ctx context.Context, req *api.SdkCloudMigrateCancelRequest) (*api.SdkCloudMigrateCancelResponse, error)
- func (s *VolumeServer) CapacityUsage(ctx context.Context, req *api.SdkVolumeCapacityUsageRequest) (*api.SdkVolumeCapacityUsageResponse, error)
- func (s *VolumeServer) Clone(ctx context.Context, req *api.SdkVolumeCloneRequest) (*api.SdkVolumeCloneResponse, error)
- func (s *VolumeServer) Create(ctx context.Context, req *api.SdkVolumeCreateRequest) (*api.SdkVolumeCreateResponse, error)
- func (s *VolumeServer) Delete(ctx context.Context, req *api.SdkVolumeDeleteRequest) (*api.SdkVolumeDeleteResponse, error)
- func (s *VolumeServer) Detach(ctx context.Context, req *api.SdkVolumeDetachRequest) (*api.SdkVolumeDetachResponse, error)
- func (s *VolumeServer) Enumerate(ctx context.Context, req *api.SdkVolumeEnumerateRequest) (*api.SdkVolumeEnumerateResponse, error)
- func (s *VolumeServer) EnumerateWithFilters(ctx context.Context, req *api.SdkVolumeEnumerateWithFiltersRequest) (*api.SdkVolumeEnumerateWithFiltersResponse, error)
- func (s *VolumeServer) Inspect(ctx context.Context, req *api.SdkVolumeInspectRequest) (*api.SdkVolumeInspectResponse, error)
- func (s *VolumeServer) Mount(ctx context.Context, req *api.SdkVolumeMountRequest) (*api.SdkVolumeMountResponse, error)
- func (s *VolumeServer) SnapshotCreate(ctx context.Context, req *api.SdkVolumeSnapshotCreateRequest) (*api.SdkVolumeSnapshotCreateResponse, error)
- func (s *VolumeServer) SnapshotEnumerate(ctx context.Context, req *api.SdkVolumeSnapshotEnumerateRequest) (*api.SdkVolumeSnapshotEnumerateResponse, error)
- func (s *VolumeServer) SnapshotEnumerateWithFilters(ctx context.Context, req *api.SdkVolumeSnapshotEnumerateWithFiltersRequest) (*api.SdkVolumeSnapshotEnumerateWithFiltersResponse, error)
- func (s *VolumeServer) SnapshotRestore(ctx context.Context, req *api.SdkVolumeSnapshotRestoreRequest) (*api.SdkVolumeSnapshotRestoreResponse, error)
- func (s *VolumeServer) SnapshotScheduleUpdate(ctx context.Context, req *api.SdkVolumeSnapshotScheduleUpdateRequest) (*api.SdkVolumeSnapshotScheduleUpdateResponse, error)
- func (s *VolumeServer) Start(ctx context.Context, req *api.SdkCloudMigrateStartRequest) (*api.SdkCloudMigrateStartResponse, error)
- func (s *VolumeServer) Stats(ctx context.Context, req *api.SdkVolumeStatsRequest) (*api.SdkVolumeStatsResponse, error)
- func (s *VolumeServer) Status(ctx context.Context, req *api.SdkCloudMigrateStatusRequest) (*api.SdkCloudMigrateStatusResponse, error)
- func (s *VolumeServer) Unmount(ctx context.Context, req *api.SdkVolumeUnmountRequest) (*api.SdkVolumeUnmountResponse, error)
- func (s *VolumeServer) Update(ctx context.Context, req *api.SdkVolumeUpdateRequest) (*api.SdkVolumeUpdateResponse, error)
Constants ¶
const ( // ContextDriverKey is the driver key passed in context's metadata ContextDriverKey = "driver" // DefaultDriverName is the default driver to be used DefaultDriverName = "default" )
const ( // Metedata context key where the token is found. // This key must be used by the caller as the key for the token in // the metedata of the context. The generated Rest Gateway also uses this // key as the location of the raw token coming from the standard REST // header: Authorization: bearer <adaf0sdfsd...token> ContextMetadataTokenKey = "bearer" )
Variables ¶
This section is empty.
Functions ¶
func GetEnforcedVolSpecs ¶
func GetEnforcedVolSpecs(locator *api.VolumeLocator, spec *api.VolumeSpec) (*api.VolumeSpec, error)
GetEnforcedVolSpecs returns volume spec merged with enforced policy applied if any
func NewAlertsServer ¶
func NewAlertsServer(filterDeleter alerts.FilterDeleter) api.OpenStorageAlertsServer
NewAlertsServer provides an instance of alerts server interface.
func ToSdkCloudBackupSchedEnumerateResponse ¶
func ToSdkCloudBackupSchedEnumerateResponse(r *api.CloudBackupSchedEnumerateResponse) *api.SdkCloudBackupSchedEnumerateResponse
func ToSdkCloudBackupdScheduleInfo ¶
func ToSdkCloudBackupdScheduleInfo(s api.CloudBackupScheduleInfo) *api.SdkCloudBackupScheduleInfo
Types ¶
type CloudBackupServer ¶
type CloudBackupServer struct {
// contains filtered or unexported fields
}
CloudBackupServer is an implementation of the gRPC OpenStorageCloudBackup interface
func (*CloudBackupServer) Catalog ¶
func (s *CloudBackupServer) Catalog( ctx context.Context, req *api.SdkCloudBackupCatalogRequest, ) (*api.SdkCloudBackupCatalogResponse, error)
Catalog
func (*CloudBackupServer) Create ¶
func (s *CloudBackupServer) Create( ctx context.Context, req *api.SdkCloudBackupCreateRequest, ) (*api.SdkCloudBackupCreateResponse, error)
Create creates a backup for a volume
func (*CloudBackupServer) Delete ¶
func (s *CloudBackupServer) Delete( ctx context.Context, req *api.SdkCloudBackupDeleteRequest, ) (*api.SdkCloudBackupDeleteResponse, error)
Delete deletes a backup
func (*CloudBackupServer) DeleteAll ¶
func (s *CloudBackupServer) DeleteAll( ctx context.Context, req *api.SdkCloudBackupDeleteAllRequest, ) (*api.SdkCloudBackupDeleteAllResponse, error)
DeleteAll deletes all backups for a certain volume
func (*CloudBackupServer) EnumerateWithFilters ¶
func (s *CloudBackupServer) EnumerateWithFilters( ctx context.Context, req *api.SdkCloudBackupEnumerateWithFiltersRequest, ) (*api.SdkCloudBackupEnumerateWithFiltersResponse, error)
Enumerate returns information about the backups
func (*CloudBackupServer) History ¶
func (s *CloudBackupServer) History( ctx context.Context, req *api.SdkCloudBackupHistoryRequest, ) (*api.SdkCloudBackupHistoryResponse, error)
History returns ??
func (*CloudBackupServer) Restore ¶
func (s *CloudBackupServer) Restore( ctx context.Context, req *api.SdkCloudBackupRestoreRequest, ) (*api.SdkCloudBackupRestoreResponse, error)
Restore a backup
func (*CloudBackupServer) SchedCreate ¶
func (s *CloudBackupServer) SchedCreate( ctx context.Context, req *api.SdkCloudBackupSchedCreateRequest, ) (*api.SdkCloudBackupSchedCreateResponse, error)
SchedCreate new schedule for cloud backup
func (*CloudBackupServer) SchedDelete ¶
func (s *CloudBackupServer) SchedDelete( ctx context.Context, req *api.SdkCloudBackupSchedDeleteRequest, ) (*api.SdkCloudBackupSchedDeleteResponse, error)
SchedDelete cloud backup schedule
func (*CloudBackupServer) SchedEnumerate ¶
func (s *CloudBackupServer) SchedEnumerate( ctx context.Context, req *api.SdkCloudBackupSchedEnumerateRequest, ) (*api.SdkCloudBackupSchedEnumerateResponse, error)
SchedEnumerate cloud backup schedule
func (*CloudBackupServer) StateChange ¶
func (s *CloudBackupServer) StateChange( ctx context.Context, req *api.SdkCloudBackupStateChangeRequest, ) (*api.SdkCloudBackupStateChangeResponse, error)
StateChange pauses and resumes backups
func (*CloudBackupServer) Status ¶
func (s *CloudBackupServer) Status( ctx context.Context, req *api.SdkCloudBackupStatusRequest, ) (*api.SdkCloudBackupStatusResponse, error)
Status provides status on a backup
type ClusterPairServer ¶
type ClusterPairServer struct {
// contains filtered or unexported fields
}
ClusterPairServer is an implementation of the gRPC OpenStorageClusterServer interface
func (*ClusterPairServer) Create ¶
func (s *ClusterPairServer) Create( ctx context.Context, req *api.SdkClusterPairCreateRequest, ) (*api.SdkClusterPairCreateResponse, error)
Create a new cluster with remote pair
func (*ClusterPairServer) Delete ¶
func (s *ClusterPairServer) Delete( ctx context.Context, req *api.SdkClusterPairDeleteRequest, ) (*api.SdkClusterPairDeleteResponse, error)
Delete removes the cluster pairing
func (*ClusterPairServer) Enumerate ¶
func (s *ClusterPairServer) Enumerate( ctx context.Context, req *api.SdkClusterPairEnumerateRequest, ) (*api.SdkClusterPairEnumerateResponse, error)
Enumerate returns list of cluster pairs
func (*ClusterPairServer) GetToken ¶
func (s *ClusterPairServer) GetToken( ctx context.Context, req *api.SdkClusterPairGetTokenRequest, ) (*api.SdkClusterPairGetTokenResponse, error)
GetToken gets the authentication token for this cluster
func (*ClusterPairServer) Inspect ¶
func (s *ClusterPairServer) Inspect( ctx context.Context, req *api.SdkClusterPairInspectRequest, ) (*api.SdkClusterPairInspectResponse, error)
Inspect information about a cluster pair
func (*ClusterPairServer) ResetToken ¶
func (s *ClusterPairServer) ResetToken( ctx context.Context, req *api.SdkClusterPairResetTokenRequest, ) (*api.SdkClusterPairResetTokenResponse, error)
ResetToken gets the authentication token for this cluster
type ClusterServer ¶
type ClusterServer struct {
// contains filtered or unexported fields
}
ClusterServer is an implementation of the gRPC OpenStorageClusterServer interface
func (*ClusterServer) InspectCurrent ¶
func (s *ClusterServer) InspectCurrent( ctx context.Context, req *api.SdkClusterInspectCurrentRequest, ) (*api.SdkClusterInspectCurrentResponse, error)
InspectCurrent returns information about the current cluster
type CredentialServer ¶
type CredentialServer struct {
// contains filtered or unexported fields
}
CredentialServer is an implementation of the gRPC OpenStorageCredential interface
func (*CredentialServer) Create ¶
func (s *CredentialServer) Create( ctx context.Context, req *api.SdkCredentialCreateRequest, ) (*api.SdkCredentialCreateResponse, error)
Create method creates credentials
func (*CredentialServer) Delete ¶
func (s *CredentialServer) Delete( ctx context.Context, req *api.SdkCredentialDeleteRequest, ) (*api.SdkCredentialDeleteResponse, error)
Delete deletes a specified credential
func (*CredentialServer) Enumerate ¶
func (s *CredentialServer) Enumerate( ctx context.Context, req *api.SdkCredentialEnumerateRequest, ) (*api.SdkCredentialEnumerateResponse, error)
Enumerate returns a list credentials ids
func (*CredentialServer) Inspect ¶
func (s *CredentialServer) Inspect( ctx context.Context, req *api.SdkCredentialInspectRequest, ) (*api.SdkCredentialInspectResponse, error)
Inspect returns information about credential id
func (*CredentialServer) Validate ¶
func (s *CredentialServer) Validate( ctx context.Context, req *api.SdkCredentialValidateRequest, ) (*api.SdkCredentialValidateResponse, error)
Validate validates a specified Credential.
type IdentityServer ¶
type IdentityServer struct {
// contains filtered or unexported fields
}
IdentityServer is an implementation of the gRPC OpenStorageIdentityServer interface
func (*IdentityServer) Capabilities ¶
func (s *IdentityServer) Capabilities( ctx context.Context, req *api.SdkIdentityCapabilitiesRequest, ) (*api.SdkIdentityCapabilitiesResponse, error)
Capabilities returns the capabilities of the SDK server
func (*IdentityServer) Version ¶
func (s *IdentityServer) Version( ctx context.Context, req *api.SdkIdentityVersionRequest, ) (*api.SdkIdentityVersionResponse, error)
Version returns version of the storage system
type NodeServer ¶
type NodeServer struct {
// contains filtered or unexported fields
}
NodeServer is an implementation of the gRPC OpenStorageNodeServer interface
func (*NodeServer) Enumerate ¶
func (s *NodeServer) Enumerate( ctx context.Context, req *api.SdkNodeEnumerateRequest, ) (*api.SdkNodeEnumerateResponse, error)
Enumerate returns the ids of all the nodes in the cluster
func (*NodeServer) Inspect ¶
func (s *NodeServer) Inspect( ctx context.Context, req *api.SdkNodeInspectRequest, ) (*api.SdkNodeInspectResponse, error)
Inspect returns information about a specific node
func (*NodeServer) InspectCurrent ¶
func (s *NodeServer) InspectCurrent( ctx context.Context, req *api.SdkNodeInspectCurrentRequest, ) (*api.SdkNodeInspectCurrentResponse, error)
type ObjectstoreServer ¶
type ObjectstoreServer struct {
// contains filtered or unexported fields
}
Objectstoreserver is an implementation of the gRPC OpenStorageObjectstore interface
func (*ObjectstoreServer) Create ¶
func (s *ObjectstoreServer) Create( ctx context.Context, req *api.SdkObjectstoreCreateRequest, ) (*api.SdkObjectstoreCreateResponse, error)
CreateObjectstore creates objectstore for given volume
func (*ObjectstoreServer) Delete ¶
func (s *ObjectstoreServer) Delete( ctx context.Context, req *api.SdkObjectstoreDeleteRequest, ) (*api.SdkObjectstoreDeleteResponse, error)
DeleteObjectstore delete objectstore from cluster
func (*ObjectstoreServer) Inspect ¶
func (s *ObjectstoreServer) Inspect( ctx context.Context, req *api.SdkObjectstoreInspectRequest, ) (*api.SdkObjectstoreInspectResponse, error)
Inspect Objectstore return status of provided objectstore
func (*ObjectstoreServer) Update ¶
func (s *ObjectstoreServer) Update( ctx context.Context, req *api.SdkObjectstoreUpdateRequest, ) (*api.SdkObjectstoreUpdateResponse, error)
UpdateObjectstore updates given objectstore state
type SchedulePolicyServer ¶
type SchedulePolicyServer struct {
// contains filtered or unexported fields
}
SchedulePolicyServer is an implementation of the gRPC OpenStorageSchedulePolicy interface
func (*SchedulePolicyServer) Create ¶
func (s *SchedulePolicyServer) Create( ctx context.Context, req *api.SdkSchedulePolicyCreateRequest, ) (*api.SdkSchedulePolicyCreateResponse, error)
Create method creates schedule policy
func (*SchedulePolicyServer) Delete ¶
func (s *SchedulePolicyServer) Delete( ctx context.Context, req *api.SdkSchedulePolicyDeleteRequest, ) (*api.SdkSchedulePolicyDeleteResponse, error)
Delete method deletes schedule policy
func (*SchedulePolicyServer) Enumerate ¶
func (s *SchedulePolicyServer) Enumerate( ctx context.Context, req *api.SdkSchedulePolicyEnumerateRequest, ) (*api.SdkSchedulePolicyEnumerateResponse, error)
Enumerate method enumerates schedule policies
func (*SchedulePolicyServer) Inspect ¶
func (s *SchedulePolicyServer) Inspect( ctx context.Context, req *api.SdkSchedulePolicyInspectRequest, ) (*api.SdkSchedulePolicyInspectResponse, error)
Inspect method inspects schedule policy
func (*SchedulePolicyServer) Update ¶
func (s *SchedulePolicyServer) Update( ctx context.Context, req *api.SdkSchedulePolicyUpdateRequest, ) (*api.SdkSchedulePolicyUpdateResponse, error)
Update method updates schedule policy
type SecurityConfig ¶
type SecurityConfig struct { // Role implementation Role role.RoleManager // Tls configuration Tls *TLSConfig // Authenticators per issuer. You can register multple authenticators // based on the "iss" string in the string. For example: // map[string]auth.Authenticator { // "https://accounts.google.com": googleOidc, // "openstorage-sdk-auth: selfSigned, // } Authenticators map[string]auth.Authenticator }
SecurityConfig provides configuration for SDK auth
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an implementation of the gRPC SDK interface
func (*Server) UdsAddress ¶
func (*Server) UseAlert ¶
func (s *Server) UseAlert(a alerts.FilterDeleter)
UseAlert will setup a new alert object for the gRPC handlers
func (*Server) UseCluster ¶
UseCluster will setup a new cluster object for the gRPC handlers
func (*Server) UseVolumeDrivers ¶
func (s *Server) UseVolumeDrivers(d map[string]volume.VolumeDriver)
UseVolumeDrivers will setup a new driver object for the gRPC handlers
type ServerConfig ¶
type ServerConfig struct { // Net is the transport for gRPC: unix, tcp, etc. // For the gRPC Server. This value goes together with `Address`. Net string // Address is the port number or the unix domain socket path. // For the gRPC Server. This value goes together with `Net`. Address string // RestAdress is the port number. Example: 9110 // For the gRPC REST Gateway. RestPort string // Unix domain socket for local communication. This socket // will be used by the REST Gateway to communicate with the gRPC server. // Only set for testing. Having a '%s' can be supported to use the // name of the driver as the driver name. Socket string // (optional) Location for audit log. // If not provided, it will go to /var/log/openstorage-audit.log AuditOutput io.Writer // (optional) Location of access log. // This is useful when authorization is not running. // If not provided, it will go to /var/log/openstorage-access.log AccessOutput io.Writer // (optional) The OpenStorage driver to use DriverName string // (optional) Cluster interface Cluster cluster.Cluster // AlertsFilterDeleter AlertsFilterDeleter alerts.FilterDeleter // StoragePolicy Manager StoragePolicy policy.PolicyManager // Security configuration Security *SecurityConfig }
ServerConfig provides the configuration to the SDK server
type TLSConfig ¶
type TLSConfig struct { // CertFile is the path to the cert file CertFile string // KeyFile is the path to the key file KeyFile string }
TLSConfig points to the cert files needed for HTTPS
type VolumeServer ¶
type VolumeServer struct {
// contains filtered or unexported fields
}
VolumeServer is an implementation of the gRPC OpenStorageVolume interface
func (*VolumeServer) Attach ¶
func (s *VolumeServer) Attach( ctx context.Context, req *api.SdkVolumeAttachRequest, ) (*api.SdkVolumeAttachResponse, error)
Attach volume to given node
func (*VolumeServer) Cancel ¶
func (s *VolumeServer) Cancel( ctx context.Context, req *api.SdkCloudMigrateCancelRequest, ) (*api.SdkCloudMigrateCancelResponse, error)
Cancel or stop a ongoing migration
func (*VolumeServer) CapacityUsage ¶
func (s *VolumeServer) CapacityUsage( ctx context.Context, req *api.SdkVolumeCapacityUsageRequest, ) (*api.SdkVolumeCapacityUsageResponse, error)
func (*VolumeServer) Clone ¶
func (s *VolumeServer) Clone( ctx context.Context, req *api.SdkVolumeCloneRequest, ) (*api.SdkVolumeCloneResponse, error)
Clone creates a new volume from an existing volume
func (*VolumeServer) Create ¶
func (s *VolumeServer) Create( ctx context.Context, req *api.SdkVolumeCreateRequest, ) (*api.SdkVolumeCreateResponse, error)
Create creates a new volume
func (*VolumeServer) Delete ¶
func (s *VolumeServer) Delete( ctx context.Context, req *api.SdkVolumeDeleteRequest, ) (*api.SdkVolumeDeleteResponse, error)
Delete deletes a volume
func (*VolumeServer) Detach ¶
func (s *VolumeServer) Detach( ctx context.Context, req *api.SdkVolumeDetachRequest, ) (*api.SdkVolumeDetachResponse, error)
Detach function for volume node detach
func (*VolumeServer) Enumerate ¶
func (s *VolumeServer) Enumerate( ctx context.Context, req *api.SdkVolumeEnumerateRequest, ) (*api.SdkVolumeEnumerateResponse, error)
Enumerate returns a list of volumes
func (*VolumeServer) EnumerateWithFilters ¶
func (s *VolumeServer) EnumerateWithFilters( ctx context.Context, req *api.SdkVolumeEnumerateWithFiltersRequest, ) (*api.SdkVolumeEnumerateWithFiltersResponse, error)
EnumerateWithFilters returns a list of volumes for the provided filters
func (*VolumeServer) Inspect ¶
func (s *VolumeServer) Inspect( ctx context.Context, req *api.SdkVolumeInspectRequest, ) (*api.SdkVolumeInspectResponse, error)
Inspect returns information about a volume
func (*VolumeServer) Mount ¶
func (s *VolumeServer) Mount( ctx context.Context, req *api.SdkVolumeMountRequest, ) (*api.SdkVolumeMountResponse, error)
Mount function for volume node detach
func (*VolumeServer) SnapshotCreate ¶
func (s *VolumeServer) SnapshotCreate( ctx context.Context, req *api.SdkVolumeSnapshotCreateRequest, ) (*api.SdkVolumeSnapshotCreateResponse, error)
SnapshotCreate creates a read-only snapshot of a volume
func (*VolumeServer) SnapshotEnumerate ¶
func (s *VolumeServer) SnapshotEnumerate( ctx context.Context, req *api.SdkVolumeSnapshotEnumerateRequest, ) (*api.SdkVolumeSnapshotEnumerateResponse, error)
SnapshotEnumerate returns a list of snapshots for the specified volume
func (*VolumeServer) SnapshotEnumerateWithFilters ¶
func (s *VolumeServer) SnapshotEnumerateWithFilters( ctx context.Context, req *api.SdkVolumeSnapshotEnumerateWithFiltersRequest, ) (*api.SdkVolumeSnapshotEnumerateWithFiltersResponse, error)
SnapshotEnumerateWithFilters returns a list of snapshots for the specified volume and labels
func (*VolumeServer) SnapshotRestore ¶
func (s *VolumeServer) SnapshotRestore( ctx context.Context, req *api.SdkVolumeSnapshotRestoreRequest, ) (*api.SdkVolumeSnapshotRestoreResponse, error)
SnapshotRestore restores a volume to the specified snapshot id
func (*VolumeServer) SnapshotScheduleUpdate ¶
func (s *VolumeServer) SnapshotScheduleUpdate( ctx context.Context, req *api.SdkVolumeSnapshotScheduleUpdateRequest, ) (*api.SdkVolumeSnapshotScheduleUpdateResponse, error)
SnapshotScheduleUpdate updates the snapshot schedule in the volume. It only manages the PolicyTags
func (*VolumeServer) Start ¶
func (s *VolumeServer) Start( ctx context.Context, req *api.SdkCloudMigrateStartRequest, ) (*api.SdkCloudMigrateStartResponse, error)
Start a volume migration
func (*VolumeServer) Stats ¶
func (s *VolumeServer) Stats( ctx context.Context, req *api.SdkVolumeStatsRequest, ) (*api.SdkVolumeStatsResponse, error)
Stats returns volume statistics
func (*VolumeServer) Status ¶
func (s *VolumeServer) Status( ctx context.Context, req *api.SdkCloudMigrateStatusRequest, ) (*api.SdkCloudMigrateStatusResponse, error)
Status of ongoing migration
func (*VolumeServer) Unmount ¶
func (s *VolumeServer) Unmount( ctx context.Context, req *api.SdkVolumeUnmountRequest, ) (*api.SdkVolumeUnmountResponse, error)
Unmount volume from given node
func (*VolumeServer) Update ¶
func (s *VolumeServer) Update( ctx context.Context, req *api.SdkVolumeUpdateRequest, ) (*api.SdkVolumeUpdateResponse, error)
Update allows the caller to change values in the volume specification