sdk

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 26 Imported by: 26

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAlertsServer

func NewAlertsServer(filterDeleter alerts.FilterDeleter) api.OpenStorageAlertsServer

NewAlertsServer provides an instance of alerts server interface.

Types

type CloudBackupServer

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

CloudBackupServer is an implementation of the gRPC OpenStorageCloudBackup interface

func (*CloudBackupServer) Catalog

Catalog

func (*CloudBackupServer) Create

Create creates a backup for a volume

func (*CloudBackupServer) Delete

Delete deletes a backup

func (*CloudBackupServer) DeleteAll

DeleteAll deletes all backups for a certain volume

func (*CloudBackupServer) Enumerate

Enumerate returns information about the backups

func (*CloudBackupServer) History

History returns ??

func (*CloudBackupServer) Restore

Restore a backup

func (*CloudBackupServer) SchedCreate

SchedCreate new schedule for cloud backup

func (*CloudBackupServer) SchedDelete

SchedDelete cloud backup schedule

func (*CloudBackupServer) SchedEnumerate

SchedEnumerate cloud backup schedule

func (*CloudBackupServer) StateChange

StateChange pauses and resumes backups

func (*CloudBackupServer) Status

Status provides status on a backup

type ClusterServer

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

ClusterServer is an implementation of the gRPC OpenStorageClusterServer interface

func (*ClusterServer) InspectCurrent

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

Create method creates credentials

func (*CredentialServer) Delete

Delete deletes a specified credential

func (*CredentialServer) Enumerate

Enumerate returns a list credentials ids

func (*CredentialServer) Inspect

Inspect returns information about credential id

func (*CredentialServer) Validate

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

Capabilities returns the capabilities of the SDK server

func (*IdentityServer) Version

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

Enumerate returns the ids of all the nodes in the cluster

func (*NodeServer) Inspect

Inspect returns information about a specific node

func (*NodeServer) InspectCurrent

type ObjectstoreServer

type ObjectstoreServer struct {
	api.OpenStorageObjectstoreServer
	// contains filtered or unexported fields
}

Objectstoreserver is an implementation of the gRPC OpenStorageObjectstore interface

func (*ObjectstoreServer) Create

CreateObjectstore creates objectstore for given volume

func (*ObjectstoreServer) Delete

DeleteObjectstore delete objectstore from cluster

func (*ObjectstoreServer) Inspect

Inspect Objectstore return status of provided objectstore

func (*ObjectstoreServer) Update

UpdateObjectstore updates given objectstore state

type SchedulePolicyServer

type SchedulePolicyServer struct {
	api.OpenStorageSchedulePolicyServer
	// contains filtered or unexported fields
}

SchedulePolicyServer is an implementation of the gRPC OpenStorageSchedulePolicy interface

func (*SchedulePolicyServer) Create

Create method creates schedule policy

func (*SchedulePolicyServer) Delete

Delete method deletes schedule policy

func (*SchedulePolicyServer) Enumerate

Enumerate method enumerates schedule policies

func (*SchedulePolicyServer) Inspect

Inspect method inspects schedule policy

func (*SchedulePolicyServer) Update

Update method updates schedule policy

type Server

type Server struct {
	*grpcserver.GrpcServer
	// contains filtered or unexported fields
}

Server is an implementation of the gRPC SDK interface

func New

func New(config *ServerConfig) (*Server, error)

New creates a new SDK gRPC server

func (*Server) Start

func (s *Server) Start() error

Start is used to start the server. It will return an error if the server is already running.

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
	// The OpenStorage driver to use
	DriverName string
	// Cluster interface
	Cluster cluster.Cluster
	// AlertsFilterDeleter
	AlertsFilterDeleter alerts.FilterDeleter
}

ServerConfig provides the configuration to the SDK server

type VolumeServer

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

VolumeServer is an implementation of the gRPC OpenStorageVolume interface

func (*VolumeServer) Attach

Attach volume to given node

func (*VolumeServer) Clone

Clone creates a new volume from an existing volume

func (*VolumeServer) Create

Create creates a new volume

func (*VolumeServer) Delete

Delete deletes a volume

func (*VolumeServer) Detach

Detach function for volume node detach

func (*VolumeServer) Enumerate

Enumerate returns a list of volumes

func (*VolumeServer) EnumerateWithFilters

EnumerateWithFilters returns a list of volumes for the provided filters

func (*VolumeServer) Inspect

Inspect returns information about a volume

func (*VolumeServer) Mount

Mount function for volume node detach

func (*VolumeServer) SnapshotCreate

SnapshotCreate creates a read-only snapshot of a volume

func (*VolumeServer) SnapshotEnumerate

SnapshotEnumerate returns a list of snapshots for the specified volume

func (*VolumeServer) SnapshotEnumerateWithFilters

SnapshotEnumerateWithFilters returns a list of snapshots for the specified volume and labels

func (*VolumeServer) SnapshotRestore

SnapshotRestore restores a volume to the specified snapshot id

func (*VolumeServer) SnapshotScheduleUpdate

SnapshotScheduleUpdate updates the snapshot schedule in the volume. It only manages the PolicyTags

func (*VolumeServer) Stats

Stats returns volume statistics

func (*VolumeServer) Unmount

Unmount volume from given node

func (*VolumeServer) Update

Update allows the caller to change values in the volume specification

Jump to

Keyboard shortcuts

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