v1

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCluster        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCluster          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCluster = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthCpu        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCpu          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCpu = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGpu        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGpu          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGpu = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMemory        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMemory          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMemory = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNode        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNode          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthResourcepair        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowResourcepair          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupResourcepair = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthResources        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowResources          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupResources = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthStorage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStorage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStorage = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterClusterRPCHandler

func RegisterClusterRPCHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterClusterRPCHandler registers the http handlers for service ClusterRPC to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterClusterRPCHandlerClient

func RegisterClusterRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterRPCClient) error

RegisterClusterRPCHandlerClient registers the http handlers for service ClusterRPC to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClusterRPCClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterRPCClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ClusterRPCClient" to call the correct interceptors.

func RegisterClusterRPCHandlerFromEndpoint

func RegisterClusterRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterClusterRPCHandlerFromEndpoint is same as RegisterClusterRPCHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterClusterRPCHandlerServer

func RegisterClusterRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterRPCServer) error

RegisterClusterRPCHandlerServer registers the http handlers for service ClusterRPC to "mux". UnaryRPC :call ClusterRPCServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClusterRPCHandlerFromEndpoint instead.

func RegisterClusterRPCServer

func RegisterClusterRPCServer(s grpc1.Server, srv ClusterRPCServer)

func RegisterNodeRPCHandler

func RegisterNodeRPCHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNodeRPCHandler registers the http handlers for service NodeRPC to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNodeRPCHandlerClient

func RegisterNodeRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeRPCClient) error

RegisterNodeRPCHandlerClient registers the http handlers for service NodeRPC to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NodeRPCClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NodeRPCClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NodeRPCClient" to call the correct interceptors.

func RegisterNodeRPCHandlerFromEndpoint

func RegisterNodeRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNodeRPCHandlerFromEndpoint is same as RegisterNodeRPCHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNodeRPCHandlerServer

func RegisterNodeRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodeRPCServer) error

RegisterNodeRPCHandlerServer registers the http handlers for service NodeRPC to "mux". UnaryRPC :call NodeRPCServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNodeRPCHandlerFromEndpoint instead.

func RegisterNodeRPCServer

func RegisterNodeRPCServer(s grpc1.Server, srv NodeRPCServer)

Types

type CPU

type CPU struct {
	Quantity ResourcePair `protobuf:"bytes,1,opt,name=quantity,proto3" json:"quantity" yaml:"quantity"`
	Info     CPUInfoS     `protobuf:"bytes,2,rep,name=info,proto3,castrepeated=CPUInfoS" json:"info" yaml:"info"`
}

CPU reports CPU inventory details

func (*CPU) Descriptor

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

func (*CPU) Dup

func (r *CPU) Dup() CPU

func (*CPU) GetInfo

func (m *CPU) GetInfo() CPUInfoS

func (*CPU) GetQuantity

func (m *CPU) GetQuantity() ResourcePair

func (*CPU) Marshal

func (m *CPU) Marshal() (dAtA []byte, err error)

func (*CPU) MarshalTo

func (m *CPU) MarshalTo(dAtA []byte) (int, error)

func (*CPU) MarshalToSizedBuffer

func (m *CPU) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CPU) ProtoMessage

func (*CPU) ProtoMessage()

func (*CPU) Reset

func (m *CPU) Reset()

func (*CPU) Size

func (m *CPU) Size() (n int)

func (*CPU) String

func (m *CPU) String() string

func (*CPU) Unmarshal

func (m *CPU) Unmarshal(dAtA []byte) error

func (*CPU) XXX_DiscardUnknown

func (m *CPU) XXX_DiscardUnknown()

func (*CPU) XXX_Marshal

func (m *CPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CPU) XXX_Merge

func (m *CPU) XXX_Merge(src proto.Message)

func (*CPU) XXX_Size

func (m *CPU) XXX_Size() int

func (*CPU) XXX_Unmarshal

func (m *CPU) XXX_Unmarshal(b []byte) error

type CPUInfo

type CPUInfo struct {
	ID     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	Vendor string `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor" yaml:"vendor"`
	Model  string `protobuf:"bytes,3,opt,name=model,proto3" json:"model" yaml:"model"`
	Vcores uint32 `protobuf:"varint,4,opt,name=vcores,proto3" json:"vcores" yaml:"vcores"`
}

CPUInfo reports CPU details

func (*CPUInfo) Descriptor

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

func (*CPUInfo) GetID

func (m *CPUInfo) GetID() string

func (*CPUInfo) GetModel

func (m *CPUInfo) GetModel() string

func (*CPUInfo) GetVcores

func (m *CPUInfo) GetVcores() uint32

func (*CPUInfo) GetVendor

func (m *CPUInfo) GetVendor() string

func (*CPUInfo) Marshal

func (m *CPUInfo) Marshal() (dAtA []byte, err error)

func (*CPUInfo) MarshalTo

func (m *CPUInfo) MarshalTo(dAtA []byte) (int, error)

func (*CPUInfo) MarshalToSizedBuffer

func (m *CPUInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CPUInfo) ProtoMessage

func (*CPUInfo) ProtoMessage()

func (*CPUInfo) Reset

func (m *CPUInfo) Reset()

func (*CPUInfo) Size

func (m *CPUInfo) Size() (n int)

func (*CPUInfo) String

func (m *CPUInfo) String() string

func (*CPUInfo) Unmarshal

func (m *CPUInfo) Unmarshal(dAtA []byte) error

func (*CPUInfo) XXX_DiscardUnknown

func (m *CPUInfo) XXX_DiscardUnknown()

func (*CPUInfo) XXX_Marshal

func (m *CPUInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CPUInfo) XXX_Merge

func (m *CPUInfo) XXX_Merge(src proto.Message)

func (*CPUInfo) XXX_Size

func (m *CPUInfo) XXX_Size() int

func (*CPUInfo) XXX_Unmarshal

func (m *CPUInfo) XXX_Unmarshal(b []byte) error

type CPUInfoS

type CPUInfoS []CPUInfo

func (CPUInfoS) Dup

func (s CPUInfoS) Dup() CPUInfoS

func (CPUInfoS) Len

func (s CPUInfoS) Len() int

func (CPUInfoS) Less

func (s CPUInfoS) Less(i, j int) bool

func (CPUInfoS) Swap

func (s CPUInfoS) Swap(i, j int)

type Cluster

type Cluster struct {
	Nodes   Nodes          `protobuf:"bytes,1,rep,name=nodes,proto3,castrepeated=Nodes" json:"nodes" yaml:"nodes"`
	Storage ClusterStorage `protobuf:"bytes,2,rep,name=storage,proto3,castrepeated=ClusterStorage" json:"storage" yaml:"storage"`
}

Cluster reports inventory across entire cluster

func (*Cluster) Descriptor

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

func (*Cluster) Dup

func (cl *Cluster) Dup() *Cluster

func (*Cluster) GetNodes

func (m *Cluster) GetNodes() Nodes

func (*Cluster) GetStorage

func (m *Cluster) GetStorage() ClusterStorage

func (*Cluster) Marshal

func (m *Cluster) Marshal() (dAtA []byte, err error)

func (*Cluster) MarshalTo

func (m *Cluster) MarshalTo(dAtA []byte) (int, error)

func (*Cluster) MarshalToSizedBuffer

func (m *Cluster) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) Reset

func (m *Cluster) Reset()

func (*Cluster) Size

func (m *Cluster) Size() (n int)

func (*Cluster) String

func (m *Cluster) String() string

func (*Cluster) Unmarshal

func (m *Cluster) Unmarshal(dAtA []byte) error

func (*Cluster) XXX_DiscardUnknown

func (m *Cluster) XXX_DiscardUnknown()

func (*Cluster) XXX_Marshal

func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Cluster) XXX_Merge

func (m *Cluster) XXX_Merge(src proto.Message)

func (*Cluster) XXX_Size

func (m *Cluster) XXX_Size() int

func (*Cluster) XXX_Unmarshal

func (m *Cluster) XXX_Unmarshal(b []byte) error

type ClusterRPCClient

type ClusterRPCClient interface {
	// QueryCluster defines a method to query hardware state of the cluster
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	QueryCluster(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Cluster, error)
	// StreamCluster defines a method to stream hardware state of the cluster
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	StreamCluster(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (ClusterRPC_StreamClusterClient, error)
}

ClusterRPCClient is the client API for ClusterRPC service.

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

func NewClusterRPCClient

func NewClusterRPCClient(cc grpc1.ClientConn) ClusterRPCClient

type ClusterRPCServer

type ClusterRPCServer interface {
	// QueryCluster defines a method to query hardware state of the cluster
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	QueryCluster(context.Context, *emptypb.Empty) (*Cluster, error)
	// StreamCluster defines a method to stream hardware state of the cluster
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	StreamCluster(*emptypb.Empty, ClusterRPC_StreamClusterServer) error
}

ClusterRPCServer is the server API for ClusterRPC service.

type ClusterRPC_StreamClusterClient

type ClusterRPC_StreamClusterClient interface {
	Recv() (*Cluster, error)
	grpc.ClientStream
}

type ClusterRPC_StreamClusterServer

type ClusterRPC_StreamClusterServer interface {
	Send(*Cluster) error
	grpc.ServerStream
}

type ClusterStorage

type ClusterStorage []Storage

func (ClusterStorage) Dup

func (ClusterStorage) Len

func (s ClusterStorage) Len() int

func (ClusterStorage) Less

func (s ClusterStorage) Less(i, j int) bool

func (ClusterStorage) Swap

func (s ClusterStorage) Swap(i, j int)

type GPU

type GPU struct {
	Quantity ResourcePair `protobuf:"bytes,1,opt,name=quantity,proto3" json:"quantity" yaml:"quantity"`
	Info     GPUInfoS     `protobuf:"bytes,2,rep,name=info,proto3,castrepeated=GPUInfoS" json:"info" yaml:"info"`
}

GPUInfo reports GPU inventory details

func (*GPU) Descriptor

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

func (*GPU) Dup

func (r *GPU) Dup() GPU

func (*GPU) GetInfo

func (m *GPU) GetInfo() GPUInfoS

func (*GPU) GetQuantity

func (m *GPU) GetQuantity() ResourcePair

func (*GPU) Marshal

func (m *GPU) Marshal() (dAtA []byte, err error)

func (*GPU) MarshalTo

func (m *GPU) MarshalTo(dAtA []byte) (int, error)

func (*GPU) MarshalToSizedBuffer

func (m *GPU) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GPU) ProtoMessage

func (*GPU) ProtoMessage()

func (*GPU) Reset

func (m *GPU) Reset()

func (*GPU) Size

func (m *GPU) Size() (n int)

func (*GPU) String

func (m *GPU) String() string

func (*GPU) Unmarshal

func (m *GPU) Unmarshal(dAtA []byte) error

func (*GPU) XXX_DiscardUnknown

func (m *GPU) XXX_DiscardUnknown()

func (*GPU) XXX_Marshal

func (m *GPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GPU) XXX_Merge

func (m *GPU) XXX_Merge(src proto.Message)

func (*GPU) XXX_Size

func (m *GPU) XXX_Size() int

func (*GPU) XXX_Unmarshal

func (m *GPU) XXX_Unmarshal(b []byte) error

type GPUInfo

type GPUInfo struct {
	Vendor     string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor" yaml:"vendor"`
	VendorID   string `protobuf:"bytes,2,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"`
	Name       string `protobuf:"bytes,3,opt,name=name,proto3" json:"name" yaml:"name"`
	ModelID    string `protobuf:"bytes,4,opt,name=modelid,proto3" json:"model_id" yaml:"model_id"`
	Interface  string `protobuf:"bytes,5,opt,name=interface,proto3" json:"interface" yaml:"interface"`
	MemorySize string `protobuf:"bytes,6,opt,name=memory_size,json=memorySize,proto3" json:"memory_size" yaml:"memory_size"`
}

GPUInfo reports GPU details

func (*GPUInfo) Descriptor

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

func (*GPUInfo) Dup

func (s *GPUInfo) Dup() GPUInfo

func (*GPUInfo) GetInterface

func (m *GPUInfo) GetInterface() string

func (*GPUInfo) GetMemorySize

func (m *GPUInfo) GetMemorySize() string

func (*GPUInfo) GetModelID

func (m *GPUInfo) GetModelID() string

func (*GPUInfo) GetName

func (m *GPUInfo) GetName() string

func (*GPUInfo) GetVendor

func (m *GPUInfo) GetVendor() string

func (*GPUInfo) GetVendorID

func (m *GPUInfo) GetVendorID() string

func (*GPUInfo) Marshal

func (m *GPUInfo) Marshal() (dAtA []byte, err error)

func (*GPUInfo) MarshalTo

func (m *GPUInfo) MarshalTo(dAtA []byte) (int, error)

func (*GPUInfo) MarshalToSizedBuffer

func (m *GPUInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GPUInfo) ProtoMessage

func (*GPUInfo) ProtoMessage()

func (*GPUInfo) Reset

func (m *GPUInfo) Reset()

func (*GPUInfo) Size

func (m *GPUInfo) Size() (n int)

func (*GPUInfo) String

func (m *GPUInfo) String() string

func (*GPUInfo) Unmarshal

func (m *GPUInfo) Unmarshal(dAtA []byte) error

func (*GPUInfo) XXX_DiscardUnknown

func (m *GPUInfo) XXX_DiscardUnknown()

func (*GPUInfo) XXX_Marshal

func (m *GPUInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GPUInfo) XXX_Merge

func (m *GPUInfo) XXX_Merge(src proto.Message)

func (*GPUInfo) XXX_Size

func (m *GPUInfo) XXX_Size() int

func (*GPUInfo) XXX_Unmarshal

func (m *GPUInfo) XXX_Unmarshal(b []byte) error

type GPUInfoS

type GPUInfoS []GPUInfo

func (GPUInfoS) Dup

func (s GPUInfoS) Dup() GPUInfoS

func (GPUInfoS) Len

func (s GPUInfoS) Len() int

func (GPUInfoS) Less

func (s GPUInfoS) Less(i, j int) bool

func (GPUInfoS) Swap

func (s GPUInfoS) Swap(i, j int)

type GPUs

type GPUs []GPU

func (GPUs) Dup

func (s GPUs) Dup() GPUs

func (GPUs) Len

func (s GPUs) Len() int

func (GPUs) Less

func (s GPUs) Less(i, j int) bool

func (GPUs) Swap

func (s GPUs) Swap(i, j int)

type InventoryMetrics

type InventoryMetrics struct {
	Active    []MetricTotal `json:"active,omitempty"`
	Pending   []MetricTotal `json:"pending,omitempty"`
	Available struct {
		Nodes   []NodeMetrics   `json:"nodes,omitempty"`
		Storage []StorageStatus `json:"storage,omitempty"`
	} `json:"available,omitempty"`
	Error error `json:"error,omitempty"`
}

InventoryMetrics stores active, pending and available units

type Memory

type Memory struct {
	Quantity ResourcePair `protobuf:"bytes,1,opt,name=quantity,proto3" json:"quantity" yaml:"quantity"`
	Info     MemoryInfoS  `protobuf:"bytes,2,rep,name=info,proto3,castrepeated=MemoryInfoS" json:"info" yaml:"info"`
}

Memory reports Memory inventory details

func (*Memory) Descriptor

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

func (*Memory) Dup

func (r *Memory) Dup() Memory

func (*Memory) GetInfo

func (m *Memory) GetInfo() MemoryInfoS

func (*Memory) GetQuantity

func (m *Memory) GetQuantity() ResourcePair

func (*Memory) Marshal

func (m *Memory) Marshal() (dAtA []byte, err error)

func (*Memory) MarshalTo

func (m *Memory) MarshalTo(dAtA []byte) (int, error)

func (*Memory) MarshalToSizedBuffer

func (m *Memory) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Memory) ProtoMessage

func (*Memory) ProtoMessage()

func (*Memory) Reset

func (m *Memory) Reset()

func (*Memory) Size

func (m *Memory) Size() (n int)

func (*Memory) String

func (m *Memory) String() string

func (*Memory) Unmarshal

func (m *Memory) Unmarshal(dAtA []byte) error

func (*Memory) XXX_DiscardUnknown

func (m *Memory) XXX_DiscardUnknown()

func (*Memory) XXX_Marshal

func (m *Memory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Memory) XXX_Merge

func (m *Memory) XXX_Merge(src proto.Message)

func (*Memory) XXX_Size

func (m *Memory) XXX_Size() int

func (*Memory) XXX_Unmarshal

func (m *Memory) XXX_Unmarshal(b []byte) error

type MemoryInfo

type MemoryInfo struct {
	Vendor    string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor" yaml:"vendor"`
	Type      string `protobuf:"bytes,2,opt,name=type,proto3" json:"type" yaml:"type"`
	TotalSize string `protobuf:"bytes,3,opt,name=total_size,json=totalSize,proto3" json:"total_size" yaml:"total_size"`
	Speed     string `protobuf:"bytes,4,opt,name=speed,proto3" json:"speed" yaml:"speed"`
}

MemoryInfo reports Memory details

func (*MemoryInfo) Descriptor

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

func (*MemoryInfo) GetSpeed

func (m *MemoryInfo) GetSpeed() string

func (*MemoryInfo) GetTotalSize

func (m *MemoryInfo) GetTotalSize() string

func (*MemoryInfo) GetType

func (m *MemoryInfo) GetType() string

func (*MemoryInfo) GetVendor

func (m *MemoryInfo) GetVendor() string

func (*MemoryInfo) Marshal

func (m *MemoryInfo) Marshal() (dAtA []byte, err error)

func (*MemoryInfo) MarshalTo

func (m *MemoryInfo) MarshalTo(dAtA []byte) (int, error)

func (*MemoryInfo) MarshalToSizedBuffer

func (m *MemoryInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MemoryInfo) ProtoMessage

func (*MemoryInfo) ProtoMessage()

func (*MemoryInfo) Reset

func (m *MemoryInfo) Reset()

func (*MemoryInfo) Size

func (m *MemoryInfo) Size() (n int)

func (*MemoryInfo) String

func (m *MemoryInfo) String() string

func (*MemoryInfo) Unmarshal

func (m *MemoryInfo) Unmarshal(dAtA []byte) error

func (*MemoryInfo) XXX_DiscardUnknown

func (m *MemoryInfo) XXX_DiscardUnknown()

func (*MemoryInfo) XXX_Marshal

func (m *MemoryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MemoryInfo) XXX_Merge

func (m *MemoryInfo) XXX_Merge(src proto.Message)

func (*MemoryInfo) XXX_Size

func (m *MemoryInfo) XXX_Size() int

func (*MemoryInfo) XXX_Unmarshal

func (m *MemoryInfo) XXX_Unmarshal(b []byte) error

type MemoryInfoS

type MemoryInfoS []MemoryInfo

func (MemoryInfoS) Dup

func (s MemoryInfoS) Dup() MemoryInfoS

type MetricTotal

type MetricTotal struct {
	CPU              uint64           `json:"cpu"`
	GPU              uint64           `json:"gpu"`
	Memory           uint64           `json:"memory"`
	StorageEphemeral uint64           `json:"storage_ephemeral"`
	Storage          map[string]int64 `json:"storage,omitempty"`
}

func (*MetricTotal) AddResources

func (inv *MetricTotal) AddResources(res dtypes.ResourceUnit)

type Metrics

type Metrics struct {
	Nodes            []NodeMetrics `json:"nodes"`
	TotalAllocatable MetricTotal   `json:"total_allocatable"`
	TotalAvailable   MetricTotal   `json:"total_available"`
}

type Node

type Node struct {
	Name         string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`
	Resources    NodeResources    `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources" yaml:"resources"`
	Capabilities NodeCapabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities" yaml:"capabilities"`
}

Node reports node inventory details

func (*Node) Descriptor

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

func (*Node) Dup

func (nd *Node) Dup() Node

func (*Node) GetCapabilities

func (m *Node) GetCapabilities() NodeCapabilities

func (*Node) GetName

func (m *Node) GetName() string

func (*Node) GetResources

func (m *Node) GetResources() NodeResources

func (*Node) IsStorageClassSupported

func (nd *Node) IsStorageClassSupported(class string) bool

func (*Node) Marshal

func (m *Node) Marshal() (dAtA []byte, err error)

func (*Node) MarshalTo

func (m *Node) MarshalTo(dAtA []byte) (int, error)

func (*Node) MarshalToSizedBuffer

func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

func (m *Node) Size() (n int)

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

func (m *Node) Unmarshal(dAtA []byte) error

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

type NodeCapabilities

type NodeCapabilities struct {
	StorageClasses []string `protobuf:"bytes,1,rep,name=storage_classes,json=storageClasses,proto3" json:"storage_classes" yaml:"storage_classes"`
}

NodeCapabilities extended list of node capabilities

func (*NodeCapabilities) Descriptor

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

func (*NodeCapabilities) Dup

func (*NodeCapabilities) GetStorageClasses

func (m *NodeCapabilities) GetStorageClasses() []string

func (*NodeCapabilities) Marshal

func (m *NodeCapabilities) Marshal() (dAtA []byte, err error)

func (*NodeCapabilities) MarshalTo

func (m *NodeCapabilities) MarshalTo(dAtA []byte) (int, error)

func (*NodeCapabilities) MarshalToSizedBuffer

func (m *NodeCapabilities) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NodeCapabilities) ProtoMessage

func (*NodeCapabilities) ProtoMessage()

func (*NodeCapabilities) Reset

func (m *NodeCapabilities) Reset()

func (*NodeCapabilities) Size

func (m *NodeCapabilities) Size() (n int)

func (*NodeCapabilities) String

func (m *NodeCapabilities) String() string

func (*NodeCapabilities) Unmarshal

func (m *NodeCapabilities) Unmarshal(dAtA []byte) error

func (*NodeCapabilities) XXX_DiscardUnknown

func (m *NodeCapabilities) XXX_DiscardUnknown()

func (*NodeCapabilities) XXX_Marshal

func (m *NodeCapabilities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeCapabilities) XXX_Merge

func (m *NodeCapabilities) XXX_Merge(src proto.Message)

func (*NodeCapabilities) XXX_Size

func (m *NodeCapabilities) XXX_Size() int

func (*NodeCapabilities) XXX_Unmarshal

func (m *NodeCapabilities) XXX_Unmarshal(b []byte) error

type NodeMetrics

type NodeMetrics struct {
	Name        string          `json:"name"`
	Allocatable ResourcesMetric `json:"allocatable"`
	Available   ResourcesMetric `json:"available"`
}

type NodeRPCClient

type NodeRPCClient interface {
	// QueryNode defines a method to query hardware state of the node
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	QueryNode(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Node, error)
	// StreamNode defines a method to stream hardware state of the node
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	StreamNode(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (NodeRPC_StreamNodeClient, error)
}

NodeRPCClient is the client API for NodeRPC service.

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

func NewNodeRPCClient

func NewNodeRPCClient(cc grpc1.ClientConn) NodeRPCClient

type NodeRPCServer

type NodeRPCServer interface {
	// QueryNode defines a method to query hardware state of the node
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	QueryNode(context.Context, *emptypb.Empty) (*Node, error)
	// StreamNode defines a method to stream hardware state of the node
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	StreamNode(*emptypb.Empty, NodeRPC_StreamNodeServer) error
}

NodeRPCServer is the server API for NodeRPC service.

type NodeRPC_StreamNodeClient

type NodeRPC_StreamNodeClient interface {
	Recv() (*Node, error)
	grpc.ClientStream
}

type NodeRPC_StreamNodeServer

type NodeRPC_StreamNodeServer interface {
	Send(*Node) error
	grpc.ServerStream
}

type NodeResources

type NodeResources struct {
	CPU              CPU          `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu" yaml:"cpu"`
	Memory           Memory       `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory" yaml:"memory"`
	GPU              GPU          `protobuf:"bytes,3,opt,name=gpu,proto3,castrepeated=GPUs" json:"gpu" yaml:"gpu"`
	EphemeralStorage ResourcePair `protobuf:"bytes,4,opt,name=ephemeral_storage,json=ephemeralStorage,proto3" json:"ephemeral_storage" yaml:"ephemeral_storage"`
	VolumesAttached  ResourcePair `protobuf:"bytes,5,opt,name=volumes_attached,json=volumesAttached,proto3" json:"volumes_attached" yaml:"volumes_attached"`
	VolumesMounted   ResourcePair `protobuf:"bytes,6,opt,name=volumes_mounted,json=volumesMounted,proto3" json:"volumes_mounted" yaml:"volumes_mounted"`
}

NodeResources reports node inventory details

func (*NodeResources) Descriptor

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

func (*NodeResources) Dup

func (s *NodeResources) Dup() NodeResources

func (*NodeResources) GetCPU

func (m *NodeResources) GetCPU() CPU

func (*NodeResources) GetEphemeralStorage

func (m *NodeResources) GetEphemeralStorage() ResourcePair

func (*NodeResources) GetGPU

func (m *NodeResources) GetGPU() GPU

func (*NodeResources) GetMemory

func (m *NodeResources) GetMemory() Memory

func (*NodeResources) GetVolumesAttached

func (m *NodeResources) GetVolumesAttached() ResourcePair

func (*NodeResources) GetVolumesMounted

func (m *NodeResources) GetVolumesMounted() ResourcePair

func (*NodeResources) Marshal

func (m *NodeResources) Marshal() (dAtA []byte, err error)

func (*NodeResources) MarshalTo

func (m *NodeResources) MarshalTo(dAtA []byte) (int, error)

func (*NodeResources) MarshalToSizedBuffer

func (m *NodeResources) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NodeResources) ProtoMessage

func (*NodeResources) ProtoMessage()

func (*NodeResources) Reset

func (m *NodeResources) Reset()

func (*NodeResources) Size

func (m *NodeResources) Size() (n int)

func (*NodeResources) String

func (m *NodeResources) String() string

func (*NodeResources) Unmarshal

func (m *NodeResources) Unmarshal(dAtA []byte) error

func (*NodeResources) XXX_DiscardUnknown

func (m *NodeResources) XXX_DiscardUnknown()

func (*NodeResources) XXX_Marshal

func (m *NodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeResources) XXX_Merge

func (m *NodeResources) XXX_Merge(src proto.Message)

func (*NodeResources) XXX_Size

func (m *NodeResources) XXX_Size() int

func (*NodeResources) XXX_Unmarshal

func (m *NodeResources) XXX_Unmarshal(b []byte) error

type Nodes

type Nodes []Node

func (Nodes) Dup

func (nd Nodes) Dup() Nodes

func (Nodes) Len

func (s Nodes) Len() int

func (Nodes) Less

func (s Nodes) Less(i, j int) bool

func (Nodes) Swap

func (s Nodes) Swap(i, j int)

type ResourcePair

type ResourcePair struct {
	Allocatable *resource.Quantity                                                  `protobuf:"bytes,1,opt,name=allocatable,proto3" json:"allocatable" yaml:"allocatable"`
	Allocated   *resource.Quantity                                                  `protobuf:"bytes,2,opt,name=allocated,proto3" json:"allocated" yaml:"allocated"`
	Attributes  github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `` /* 182-byte string literal not displayed */
}

ResourcePair to extents resource.Quantity to provide total and available units of the resource

func NewResourcePair

func NewResourcePair(allocatable, allocated int64, format resource.Format) ResourcePair

func NewResourcePairMilli

func NewResourcePairMilli(allocatable, allocated int64, format resource.Format) ResourcePair

func (*ResourcePair) Available

func (m *ResourcePair) Available() *resource.Quantity

func (*ResourcePair) Descriptor

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

func (*ResourcePair) Dup

func (m *ResourcePair) Dup() ResourcePair

func (*ResourcePair) Equal

func (m *ResourcePair) Equal(rhs ResourcePair) bool

func (*ResourcePair) GetAllocatable

func (m *ResourcePair) GetAllocatable() *resource.Quantity

func (*ResourcePair) GetAllocated

func (m *ResourcePair) GetAllocated() *resource.Quantity

func (*ResourcePair) LT

func (m *ResourcePair) LT(rhs ResourcePair) bool

func (*ResourcePair) Marshal

func (m *ResourcePair) Marshal() (dAtA []byte, err error)

func (*ResourcePair) MarshalTo

func (m *ResourcePair) MarshalTo(dAtA []byte) (int, error)

func (*ResourcePair) MarshalToSizedBuffer

func (m *ResourcePair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResourcePair) ProtoMessage

func (*ResourcePair) ProtoMessage()

func (*ResourcePair) Reset

func (m *ResourcePair) Reset()

func (*ResourcePair) Size

func (m *ResourcePair) Size() (n int)

func (*ResourcePair) String

func (m *ResourcePair) String() string

func (*ResourcePair) SubMilliNLZ

func (m *ResourcePair) SubMilliNLZ(val types.ResourceValue) bool

func (*ResourcePair) SubNLZ

func (m *ResourcePair) SubNLZ(val types.ResourceValue) bool

func (*ResourcePair) Unmarshal

func (m *ResourcePair) Unmarshal(dAtA []byte) error

func (*ResourcePair) XXX_DiscardUnknown

func (m *ResourcePair) XXX_DiscardUnknown()

func (*ResourcePair) XXX_Marshal

func (m *ResourcePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResourcePair) XXX_Merge

func (m *ResourcePair) XXX_Merge(src proto.Message)

func (*ResourcePair) XXX_Size

func (m *ResourcePair) XXX_Size() int

func (*ResourcePair) XXX_Unmarshal

func (m *ResourcePair) XXX_Unmarshal(b []byte) error

type ResourcesMetric

type ResourcesMetric struct {
	CPU              uint64 `json:"cpu"`
	GPU              uint64 `json:"gpu"`
	Memory           uint64 `json:"memory"`
	StorageEphemeral uint64 `json:"storage_ephemeral"`
}

type Storage

type Storage struct {
	Quantity ResourcePair `protobuf:"bytes,1,opt,name=quantity,proto3" json:"quantity" yaml:"quantity"`
	Info     StorageInfo  `protobuf:"bytes,2,opt,name=info,proto3" json:"info" yaml:"info"`
}

Storage reports Storage inventory details

func (*Storage) Descriptor

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

func (*Storage) Dup

func (r *Storage) Dup() Storage

func (*Storage) GetInfo

func (m *Storage) GetInfo() StorageInfo

func (*Storage) GetQuantity

func (m *Storage) GetQuantity() ResourcePair

func (*Storage) Marshal

func (m *Storage) Marshal() (dAtA []byte, err error)

func (*Storage) MarshalTo

func (m *Storage) MarshalTo(dAtA []byte) (int, error)

func (*Storage) MarshalToSizedBuffer

func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Storage) ProtoMessage

func (*Storage) ProtoMessage()

func (*Storage) Reset

func (m *Storage) Reset()

func (*Storage) Size

func (m *Storage) Size() (n int)

func (*Storage) String

func (m *Storage) String() string

func (*Storage) Unmarshal

func (m *Storage) Unmarshal(dAtA []byte) error

func (*Storage) XXX_DiscardUnknown

func (m *Storage) XXX_DiscardUnknown()

func (*Storage) XXX_Marshal

func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Storage) XXX_Merge

func (m *Storage) XXX_Merge(src proto.Message)

func (*Storage) XXX_Size

func (m *Storage) XXX_Size() int

func (*Storage) XXX_Unmarshal

func (m *Storage) XXX_Unmarshal(b []byte) error

type StorageInfo

type StorageInfo struct {
	Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class" yaml:"class"`
	IOPS  string `protobuf:"bytes,2,opt,name=iops,proto3" json:"iops" yaml:"iops"`
}

StorageInfo reports Storage details

func (*StorageInfo) Descriptor

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

func (*StorageInfo) Dup

func (s *StorageInfo) Dup() StorageInfo

func (*StorageInfo) GetClass

func (m *StorageInfo) GetClass() string

func (*StorageInfo) GetIOPS

func (m *StorageInfo) GetIOPS() string

func (*StorageInfo) Marshal

func (m *StorageInfo) Marshal() (dAtA []byte, err error)

func (*StorageInfo) MarshalTo

func (m *StorageInfo) MarshalTo(dAtA []byte) (int, error)

func (*StorageInfo) MarshalToSizedBuffer

func (m *StorageInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageInfo) ProtoMessage

func (*StorageInfo) ProtoMessage()

func (*StorageInfo) Reset

func (m *StorageInfo) Reset()

func (*StorageInfo) Size

func (m *StorageInfo) Size() (n int)

func (*StorageInfo) String

func (m *StorageInfo) String() string

func (*StorageInfo) Unmarshal

func (m *StorageInfo) Unmarshal(dAtA []byte) error

func (*StorageInfo) XXX_DiscardUnknown

func (m *StorageInfo) XXX_DiscardUnknown()

func (*StorageInfo) XXX_Marshal

func (m *StorageInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StorageInfo) XXX_Merge

func (m *StorageInfo) XXX_Merge(src proto.Message)

func (*StorageInfo) XXX_Size

func (m *StorageInfo) XXX_Size() int

func (*StorageInfo) XXX_Unmarshal

func (m *StorageInfo) XXX_Unmarshal(b []byte) error

type StorageStatus

type StorageStatus struct {
	Class string `json:"class"`
	Size  int64  `json:"size"`
}

type UnimplementedClusterRPCServer

type UnimplementedClusterRPCServer struct {
}

UnimplementedClusterRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedClusterRPCServer) QueryCluster

func (*UnimplementedClusterRPCServer) StreamCluster

type UnimplementedNodeRPCServer

type UnimplementedNodeRPCServer struct {
}

UnimplementedNodeRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedNodeRPCServer) QueryNode

func (*UnimplementedNodeRPCServer) QueryNode(ctx context.Context, req *emptypb.Empty) (*Node, error)

func (*UnimplementedNodeRPCServer) StreamNode

Jump to

Keyboard shortcuts

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