ndm

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterInfoServer

func RegisterInfoServer(s *grpc.Server, srv InfoServer)

func RegisterNodeServer

func RegisterNodeServer(s *grpc.Server, srv NodeServer)

Types

type BlockDevice

type BlockDevice struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Type can be Disk, Loop, LVM, etc
	Type       string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Partitions []string `protobuf:"bytes,3,rep,name=partitions,proto3" json:"partitions,omitempty"` // Other fields about disk can be added here
	// contains filtered or unexported fields
}

func (*BlockDevice) Descriptor deprecated

func (*BlockDevice) Descriptor() ([]byte, []int)

Deprecated: Use BlockDevice.ProtoReflect.Descriptor instead.

func (*BlockDevice) GetName

func (x *BlockDevice) GetName() string

func (*BlockDevice) GetPartitions

func (x *BlockDevice) GetPartitions() []string

func (*BlockDevice) GetType

func (x *BlockDevice) GetType() string

func (*BlockDevice) ProtoMessage

func (*BlockDevice) ProtoMessage()

func (*BlockDevice) ProtoReflect

func (x *BlockDevice) ProtoReflect() protoreflect.Message

func (*BlockDevice) Reset

func (x *BlockDevice) Reset()

func (*BlockDevice) String

func (x *BlockDevice) String() string

type BlockDeviceDetails

type BlockDeviceDetails struct {
	Compliance       string `protobuf:"bytes,1,opt,name=Compliance,proto3" json:"Compliance,omitempty"`
	Vendor           string `protobuf:"bytes,2,opt,name=Vendor,proto3" json:"Vendor,omitempty"`
	Model            string `protobuf:"bytes,3,opt,name=Model,proto3" json:"Model,omitempty"`
	SerialNumber     string `protobuf:"bytes,4,opt,name=SerialNumber,proto3" json:"SerialNumber,omitempty"`
	FirmwareRevision string `protobuf:"bytes,5,opt,name=FirmwareRevision,proto3" json:"FirmwareRevision,omitempty"`
	WWN              string `protobuf:"bytes,6,opt,name=WWN,proto3" json:"WWN,omitempty"`
	Capacity         uint64 `protobuf:"varint,7,opt,name=Capacity,proto3" json:"Capacity,omitempty"`
	LBSize           uint32 `protobuf:"varint,8,opt,name=LBSize,proto3" json:"LBSize,omitempty"`
	PBSize           uint32 `protobuf:"varint,9,opt,name=PBSize,proto3" json:"PBSize,omitempty"`
	RotationRate     uint32 `protobuf:"varint,10,opt,name=RotationRate,proto3" json:"RotationRate,omitempty"`
	ATAMajorVersion  string `protobuf:"bytes,11,opt,name=ATAMajorVersion,proto3" json:"ATAMajorVersion,omitempty"`
	ATAMinorVersion  string `protobuf:"bytes,12,opt,name=ATAMinorVersion,proto3" json:"ATAMinorVersion,omitempty"`
	AtaTransport     string `protobuf:"bytes,13,opt,name=AtaTransport,proto3" json:"AtaTransport,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockDeviceDetails) Descriptor deprecated

func (*BlockDeviceDetails) Descriptor() ([]byte, []int)

Deprecated: Use BlockDeviceDetails.ProtoReflect.Descriptor instead.

func (*BlockDeviceDetails) GetATAMajorVersion

func (x *BlockDeviceDetails) GetATAMajorVersion() string

func (*BlockDeviceDetails) GetATAMinorVersion

func (x *BlockDeviceDetails) GetATAMinorVersion() string

func (*BlockDeviceDetails) GetAtaTransport

func (x *BlockDeviceDetails) GetAtaTransport() string

func (*BlockDeviceDetails) GetCapacity

func (x *BlockDeviceDetails) GetCapacity() uint64

func (*BlockDeviceDetails) GetCompliance

func (x *BlockDeviceDetails) GetCompliance() string

func (*BlockDeviceDetails) GetFirmwareRevision

func (x *BlockDeviceDetails) GetFirmwareRevision() string

func (*BlockDeviceDetails) GetLBSize

func (x *BlockDeviceDetails) GetLBSize() uint32

func (*BlockDeviceDetails) GetModel

func (x *BlockDeviceDetails) GetModel() string

func (*BlockDeviceDetails) GetPBSize

func (x *BlockDeviceDetails) GetPBSize() uint32

func (*BlockDeviceDetails) GetRotationRate

func (x *BlockDeviceDetails) GetRotationRate() uint32

func (*BlockDeviceDetails) GetSerialNumber

func (x *BlockDeviceDetails) GetSerialNumber() string

func (*BlockDeviceDetails) GetVendor

func (x *BlockDeviceDetails) GetVendor() string

func (*BlockDeviceDetails) GetWWN

func (x *BlockDeviceDetails) GetWWN() string

func (*BlockDeviceDetails) ProtoMessage

func (*BlockDeviceDetails) ProtoMessage()

func (*BlockDeviceDetails) ProtoReflect

func (x *BlockDeviceDetails) ProtoReflect() protoreflect.Message

func (*BlockDeviceDetails) Reset

func (x *BlockDeviceDetails) Reset()

func (*BlockDeviceDetails) String

func (x *BlockDeviceDetails) String() string

type BlockDevices

type BlockDevices struct {
	Blockdevices []*BlockDevice `protobuf:"bytes,1,rep,name=blockdevices,proto3" json:"blockdevices,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockDevices) Descriptor deprecated

func (*BlockDevices) Descriptor() ([]byte, []int)

Deprecated: Use BlockDevices.ProtoReflect.Descriptor instead.

func (*BlockDevices) GetBlockdevices

func (x *BlockDevices) GetBlockdevices() []*BlockDevice

func (*BlockDevices) ProtoMessage

func (*BlockDevices) ProtoMessage()

func (*BlockDevices) ProtoReflect

func (x *BlockDevices) ProtoReflect() protoreflect.Message

func (*BlockDevices) Reset

func (x *BlockDevices) Reset()

func (*BlockDevices) String

func (x *BlockDevices) String() string

type Hugepages

type Hugepages struct {
	Pages int32 `protobuf:"varint,1,opt,name=pages,proto3" json:"pages,omitempty"`
	// contains filtered or unexported fields
}

func (*Hugepages) Descriptor deprecated

func (*Hugepages) Descriptor() ([]byte, []int)

Deprecated: Use Hugepages.ProtoReflect.Descriptor instead.

func (*Hugepages) GetPages

func (x *Hugepages) GetPages() int32

func (*Hugepages) ProtoMessage

func (*Hugepages) ProtoMessage()

func (*Hugepages) ProtoReflect

func (x *Hugepages) ProtoReflect() protoreflect.Message

func (*Hugepages) Reset

func (x *Hugepages) Reset()

func (*Hugepages) String

func (x *Hugepages) String() string

type HugepagesResult

type HugepagesResult struct {
	Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*HugepagesResult) Descriptor deprecated

func (*HugepagesResult) Descriptor() ([]byte, []int)

Deprecated: Use HugepagesResult.ProtoReflect.Descriptor instead.

func (*HugepagesResult) GetResult

func (x *HugepagesResult) GetResult() bool

func (*HugepagesResult) ProtoMessage

func (*HugepagesResult) ProtoMessage()

func (*HugepagesResult) ProtoReflect

func (x *HugepagesResult) ProtoReflect() protoreflect.Message

func (*HugepagesResult) Reset

func (x *HugepagesResult) Reset()

func (*HugepagesResult) String

func (x *HugepagesResult) String() string

type InfoClient

type InfoClient interface {
	// FindVersion Method gets the version information of the NDM components installed
	FindVersion(ctx context.Context, in *Null, opts ...grpc.CallOption) (*VersionInfo, error)
}

InfoClient is the client API for Info service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInfoClient

func NewInfoClient(cc grpc.ClientConnInterface) InfoClient

type InfoServer

type InfoServer interface {
	// FindVersion Method gets the version information of the NDM components installed
	FindVersion(context.Context, *Null) (*VersionInfo, error)
}

InfoServer is the server API for Info service.

type Message

type Message struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetMsg

func (x *Message) GetMsg() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type NodeClient

type NodeClient interface {
	// Name method is used find the name of the node on which NDM is running on
	Name(ctx context.Context, in *Null, opts ...grpc.CallOption) (*NodeName, error)
	// ListBlockDevices method is used to return all the block devices found in hierarchy by NDM
	ListBlockDevices(ctx context.Context, in *Null, opts ...grpc.CallOption) (*BlockDevices, error)
	// ISCSIStatus method returns status of ISCSI
	ISCSIStatus(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Status, error)
	// ListBlockDeviceDetails method is used to find SMART info about a block device.
	// Only the name field is required for input
	ListBlockDeviceDetails(ctx context.Context, in *BlockDevice, opts ...grpc.CallOption) (*BlockDeviceDetails, error)
	// SetHugepages sets 2MB hugePages on this node.
	// Note: Calling this method doesn't guarantee that the said number of pages will be set.
	// This is because OS might not have the demanded memory. It would be best to check if this is satisfied with GetHugePages
	SetHugepages(ctx context.Context, in *Hugepages, opts ...grpc.CallOption) (*HugepagesResult, error)
	// GetHugepages gets the number of huge pages set on the node
	GetHugepages(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Hugepages, error)
	// Rescan syncs etcd and NDM's local state
	Rescan(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Message, error)
}

NodeClient is the client API for Node service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNodeClient

func NewNodeClient(cc grpc.ClientConnInterface) NodeClient

type NodeName

type NodeName struct {
	NodeName string `protobuf:"bytes,1,opt,name=NodeName,proto3" json:"NodeName,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeName) Descriptor deprecated

func (*NodeName) Descriptor() ([]byte, []int)

Deprecated: Use NodeName.ProtoReflect.Descriptor instead.

func (*NodeName) GetNodeName

func (x *NodeName) GetNodeName() string

func (*NodeName) ProtoMessage

func (*NodeName) ProtoMessage()

func (*NodeName) ProtoReflect

func (x *NodeName) ProtoReflect() protoreflect.Message

func (*NodeName) Reset

func (x *NodeName) Reset()

func (*NodeName) String

func (x *NodeName) String() string

type NodeServer

type NodeServer interface {
	// Name method is used find the name of the node on which NDM is running on
	Name(context.Context, *Null) (*NodeName, error)
	// ListBlockDevices method is used to return all the block devices found in hierarchy by NDM
	ListBlockDevices(context.Context, *Null) (*BlockDevices, error)
	// ISCSIStatus method returns status of ISCSI
	ISCSIStatus(context.Context, *Null) (*Status, error)
	// ListBlockDeviceDetails method is used to find SMART info about a block device.
	// Only the name field is required for input
	ListBlockDeviceDetails(context.Context, *BlockDevice) (*BlockDeviceDetails, error)
	// SetHugepages sets 2MB hugePages on this node.
	// Note: Calling this method doesn't guarantee that the said number of pages will be set.
	// This is because OS might not have the demanded memory. It would be best to check if this is satisfied with GetHugePages
	SetHugepages(context.Context, *Hugepages) (*HugepagesResult, error)
	// GetHugepages gets the number of huge pages set on the node
	GetHugepages(context.Context, *Null) (*Hugepages, error)
	// Rescan syncs etcd and NDM's local state
	Rescan(context.Context, *Null) (*Message, error)
}

NodeServer is the server API for Node service.

type Null

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

func (*Null) Descriptor deprecated

func (*Null) Descriptor() ([]byte, []int)

Deprecated: Use Null.ProtoReflect.Descriptor instead.

func (*Null) ProtoMessage

func (*Null) ProtoMessage()

func (*Null) ProtoReflect

func (x *Null) ProtoReflect() protoreflect.Message

func (*Null) Reset

func (x *Null) Reset()

func (*Null) String

func (x *Null) String() string

type Status

type Status struct {
	Status bool `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetStatus

func (x *Status) GetStatus() bool

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type UnimplementedInfoServer

type UnimplementedInfoServer struct {
}

UnimplementedInfoServer can be embedded to have forward compatible implementations.

func (*UnimplementedInfoServer) FindVersion

type UnimplementedNodeServer

type UnimplementedNodeServer struct {
}

UnimplementedNodeServer can be embedded to have forward compatible implementations.

func (*UnimplementedNodeServer) GetHugepages

func (*UnimplementedNodeServer) ISCSIStatus

func (*UnimplementedNodeServer) ListBlockDeviceDetails

func (*UnimplementedNodeServer) ListBlockDevices

func (*UnimplementedNodeServer) ListBlockDevices(context.Context, *Null) (*BlockDevices, error)

func (*UnimplementedNodeServer) Name

func (*UnimplementedNodeServer) Rescan

func (*UnimplementedNodeServer) SetHugepages

type VersionInfo

type VersionInfo struct {
	Version   string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
	GitCommit string `protobuf:"bytes,2,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"`
	// contains filtered or unexported fields
}

func (*VersionInfo) Descriptor deprecated

func (*VersionInfo) Descriptor() ([]byte, []int)

Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead.

func (*VersionInfo) GetGitCommit

func (x *VersionInfo) GetGitCommit() string

func (*VersionInfo) GetVersion

func (x *VersionInfo) GetVersion() string

func (*VersionInfo) ProtoMessage

func (*VersionInfo) ProtoMessage()

func (*VersionInfo) ProtoReflect

func (x *VersionInfo) ProtoReflect() protoreflect.Message

func (*VersionInfo) Reset

func (x *VersionInfo) Reset()

func (*VersionInfo) String

func (x *VersionInfo) String() string

Jump to

Keyboard shortcuts

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