proto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

(C) Copyright 2019 Intel Corporation.

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.

GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.

(C) Copyright 2019 Intel Corporation.

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.

GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockNvmeController

func MockNvmeController(varIdx ...int32) *ctlpb.NvmeController

MockNvmeController is a mock protobuf Controller message used in tests for multiple packages (message contains repeated namespace field).

func MockNvmeDeviceHealth

func MockNvmeDeviceHealth(varIdx ...int32) *ctlpb.NvmeController_Health

MockNvmeDeviceHealth is a mock protobuf Health message used in tests for multiple packages.

func MockNvmeNamespace

func MockNvmeNamespace(varIdx ...int32) *ctlpb.NvmeController_Namespace

MockNvmeNamespace is a mock protobuf Namespace message used in tests for multiple packages.

func MockScmModule

func MockScmModule(varIdx ...int32) *ctlpb.ScmModule

MockScmModule generates specific protobuf SCM module message used in tests for multiple packages.

func MockScmMount

func MockScmMount() *ctlpb.ScmMount

MockScmMount is a mock protobuf Mount message used in tests for multiple packages.

func MockScmNamespace added in v0.9.1

func MockScmNamespace(varIdx ...int32) *ctlpb.ScmNamespace

MockScmNamespace generates specific protobuf SCM namespace message used in tests for multiple packages.

func NewMockNvmeController

func NewMockNvmeController(
	pciAddr string, fwRev string, model string, serial string,
	nss []*ctlpb.NvmeController_Namespace, hs *ctlpb.NvmeController_Health) *ctlpb.NvmeController

NewMockNvmeController generates specific protobuf controller message.

Types

type NvmeController

type NvmeController ctlpb.NvmeController

func (*NvmeController) AsProto

func (pb *NvmeController) AsProto() *ctlpb.NvmeController

func (*NvmeController) Capacity added in v0.9.1

func (nc *NvmeController) Capacity() (tb uint64)

func (*NvmeController) CtrlrDetail added in v0.9.1

func (nc *NvmeController) CtrlrDetail(buf *bytes.Buffer)

CtrlrDetail provides custom string representation for Controller.

Append to buffer referenced by input parameter.

func (*NvmeController) FromNative

func (pb *NvmeController) FromNative(native *storage.NvmeController) error

func (*NvmeController) HealthDetail added in v0.9.1

func (nc *NvmeController) HealthDetail(buf *bytes.Buffer)

HealthDetail provides custom string representation for Controller including health statistics.

Append to buffer referenced by input parameter.

func (*NvmeController) ToNative

func (pb *NvmeController) ToNative() (*storage.NvmeController, error)

type NvmeControllerResults

type NvmeControllerResults []*ctlpb.NvmeControllerResult

NvmeControllerResults is an alias for protobuf NvmeControllerResult messages representing operation results on a number of NVMe controllers.

func (NvmeControllerResults) HasErrors

func (ncr NvmeControllerResults) HasErrors() bool

type NvmeControllers

type NvmeControllers []*ctlpb.NvmeController

NvmeControllers is an alias for protobuf NvmeController message slice representing a number of NVMe SSD controllers installed on a storage node.

func (NvmeControllers) Capacity added in v0.9.1

func (ncs NvmeControllers) Capacity() (tb uint64)

func (*NvmeControllers) FromNative

func (pb *NvmeControllers) FromNative(native storage.NvmeControllers) error

func (NvmeControllers) String

func (ncs NvmeControllers) String() string

func (NvmeControllers) StringHealthStats

func (ncs NvmeControllers) StringHealthStats() string

StringHealthStats returns full string representation including NVMe health statistics as well as controller and namespace details.

func (NvmeControllers) Summary

func (ncs NvmeControllers) Summary() string

Summary reports accumulated storage space and the number of controllers.

func (*NvmeControllers) ToNative

func (pb *NvmeControllers) ToNative() (storage.NvmeControllers, error)

type NvmeDeviceHealth

type NvmeDeviceHealth ctlpb.NvmeController_Health

func (*NvmeDeviceHealth) AsProto

func (*NvmeDeviceHealth) FromNative

func (pb *NvmeDeviceHealth) FromNative(native *storage.NvmeDeviceHealth) error

func (*NvmeDeviceHealth) ToNative

func (pb *NvmeDeviceHealth) ToNative() (*storage.NvmeDeviceHealth, error)

type NvmeNamespace

type NvmeNamespace ctlpb.NvmeController_Namespace

func (*NvmeNamespace) AsProto

func (*NvmeNamespace) FromNative

func (pb *NvmeNamespace) FromNative(native *storage.NvmeNamespace) error

func (*NvmeNamespace) ToNative

func (pb *NvmeNamespace) ToNative() (*storage.NvmeNamespace, error)

type NvmeNamespaces

type NvmeNamespaces []*ctlpb.NvmeController_Namespace

NvmeNamespaces is an alias for protobuf NvmeController_Namespace message slice representing namespaces existing on a NVMe SSD.

type ScmModule added in v0.9.1

type ScmModule ctlpb.ScmModule

func (*ScmModule) AsProto added in v0.9.1

func (pb *ScmModule) AsProto() *ctlpb.ScmModule

func (*ScmModule) FromNative added in v0.9.1

func (pb *ScmModule) FromNative(native *storage.ScmModule) error

func (*ScmModule) ToNative added in v0.9.1

func (pb *ScmModule) ToNative() (*storage.ScmModule, error)

type ScmModuleResults

type ScmModuleResults []*ctlpb.ScmModuleResult

ScmModuleResults is an alias for protobuf ScmModuleResult message slice representing operation results on a number of SCM modules.

type ScmModules

type ScmModules []*ctlpb.ScmModule

ScmModules is an alias for protobuf ScmModule message slice representing a number of SCM modules installed on a storage node.

func (*ScmModules) FromNative added in v0.9.1

func (pb *ScmModules) FromNative(native storage.ScmModules) error

func (*ScmModules) ToNative added in v0.9.1

func (pb *ScmModules) ToNative() (storage.ScmModules, error)

type ScmMountResults

type ScmMountResults []*ctlpb.ScmMountResult

ScmMountResults is an alias for protobuf ScmMountResult message slice representing operation results on a number of SCM mounts.

func (ScmMountResults) HasErrors

func (smr ScmMountResults) HasErrors() bool

type ScmMounts

type ScmMounts []*ctlpb.ScmMount

ScmMounts are protobuf representations of mounted SCM namespaces identified by mount points

type ScmNamespace added in v0.9.1

type ScmNamespace ctlpb.ScmNamespace

func (*ScmNamespace) AsProto added in v0.9.1

func (pb *ScmNamespace) AsProto() *ctlpb.ScmNamespace

func (*ScmNamespace) FromNative added in v0.9.1

func (pb *ScmNamespace) FromNative(native *storage.ScmNamespace) error

func (*ScmNamespace) ToNative added in v0.9.1

func (pb *ScmNamespace) ToNative() (*storage.ScmNamespace, error)

type ScmNamespaces

type ScmNamespaces []*ctlpb.ScmNamespace

ScmNamespaces is an alias for protobuf ScmNamespace message slice representing a number of SCM modules installed on a storage node.

func (*ScmNamespaces) FromNative added in v0.9.1

func (pb *ScmNamespaces) FromNative(native storage.ScmNamespaces) error

func (ScmNamespaces) String

func (sns ScmNamespaces) String() string

func (*ScmNamespaces) ToNative added in v0.9.1

func (pb *ScmNamespaces) ToNative() (storage.ScmNamespaces, error)

Directories

Path Synopsis
(C) Copyright 2019 Intel Corporation.
(C) Copyright 2019 Intel Corporation.
(C) Copyright 2019 Intel Corporation.
(C) Copyright 2019 Intel Corporation.

Jump to

Keyboard shortcuts

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