groundcontrol

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Overview

Package groundcontrol is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	GRPCEndpoint = 6000
	HTTPEndpoint = 9000
)

Variables

View Source
var (
	PxeFirmware_name = map[int32]string{
		0: "UEFI",
		1: "LEGACY",
	}
	PxeFirmware_value = map[string]int32{
		"UEFI":   0,
		"LEGACY": 1,
	}
)

Enum value maps for PxeFirmware.

View Source
var File_pkg_api_ground_control_proto protoreflect.FileDescriptor

Functions

func RegisterGroundControlHandler

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

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

func RegisterGroundControlHandlerClient

func RegisterGroundControlHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GroundControlClient) error

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

func RegisterGroundControlHandlerFromEndpoint

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

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

func RegisterGroundControlHandlerServer

func RegisterGroundControlHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GroundControlServer) error

RegisterGroundControlHandlerServer registers the http handlers for service GroundControl to "mux". UnaryRPC :call GroundControlServer 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 RegisterGroundControlHandlerFromEndpoint instead.

func RegisterGroundControlServer

func RegisterGroundControlServer(s *grpc.Server, srv GroundControlServer)

Types

type ConfigureRequest

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

func (*ConfigureRequest) Descriptor deprecated

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

Deprecated: Use ConfigureRequest.ProtoReflect.Descriptor instead.

func (*ConfigureRequest) ProtoMessage

func (*ConfigureRequest) ProtoMessage()

func (*ConfigureRequest) ProtoReflect

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

func (*ConfigureRequest) Reset

func (x *ConfigureRequest) Reset()

func (*ConfigureRequest) String

func (x *ConfigureRequest) String() string

type ConfigureResponse

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

func (*ConfigureResponse) Descriptor deprecated

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

Deprecated: Use ConfigureResponse.ProtoReflect.Descriptor instead.

func (*ConfigureResponse) ProtoMessage

func (*ConfigureResponse) ProtoMessage()

func (*ConfigureResponse) ProtoReflect

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

func (*ConfigureResponse) Reset

func (x *ConfigureResponse) Reset()

func (*ConfigureResponse) String

func (x *ConfigureResponse) String() string

type Dance4Request

type Dance4Request struct {
	Mac   string   `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"`
	Ipv4  string   `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Names []string `protobuf:"bytes,3,rep,name=names,proto3" json:"names,omitempty"`
	// contains filtered or unexported fields
}

func (*Dance4Request) Descriptor deprecated

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

Deprecated: Use Dance4Request.ProtoReflect.Descriptor instead.

func (*Dance4Request) GetIpv4

func (x *Dance4Request) GetIpv4() string

func (*Dance4Request) GetMac

func (x *Dance4Request) GetMac() string

func (*Dance4Request) GetNames

func (x *Dance4Request) GetNames() []string

func (*Dance4Request) ProtoMessage

func (*Dance4Request) ProtoMessage()

func (*Dance4Request) ProtoReflect

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

func (*Dance4Request) Reset

func (x *Dance4Request) Reset()

func (*Dance4Request) String

func (x *Dance4Request) String() string

type Dance4Response

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

func (*Dance4Response) Descriptor deprecated

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

Deprecated: Use Dance4Response.ProtoReflect.Descriptor instead.

func (*Dance4Response) GetIpv4

func (x *Dance4Response) GetIpv4() string

func (*Dance4Response) ProtoMessage

func (*Dance4Response) ProtoMessage()

func (*Dance4Response) ProtoReflect

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

func (*Dance4Response) Reset

func (x *Dance4Response) Reset()

func (*Dance4Response) String

func (x *Dance4Response) String() string

type GroundControlClient

type GroundControlClient interface {
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error)
	Power(ctx context.Context, in *PowerRequest, opts ...grpc.CallOption) (*PowerResponse, error)
	AddDance4Entry(ctx context.Context, in *Dance4Request, opts ...grpc.CallOption) (*Dance4Response, error)
	DelDance4Entry(ctx context.Context, in *Dance4Request, opts ...grpc.CallOption) (*Dance4Response, error)
	NewIP4(ctx context.Context, in *IP4Request, opts ...grpc.CallOption) (*IP4Response, error)
	FreeIP4(ctx context.Context, in *IP4Request, opts ...grpc.CallOption) (*IP4Response, error)
}

GroundControlClient is the client API for GroundControl service.

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

type GroundControlServer

GroundControlServer is the server API for GroundControl service.

type IP4Request

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

func (*IP4Request) Descriptor deprecated

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

Deprecated: Use IP4Request.ProtoReflect.Descriptor instead.

func (*IP4Request) GetIpv4

func (x *IP4Request) GetIpv4() string

func (*IP4Request) ProtoMessage

func (*IP4Request) ProtoMessage()

func (*IP4Request) ProtoReflect

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

func (*IP4Request) Reset

func (x *IP4Request) Reset()

func (*IP4Request) String

func (x *IP4Request) String() string

type IP4Response

type IP4Response struct {
	Ipv4 string `protobuf:"bytes,1,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Bits int32  `protobuf:"varint,2,opt,name=bits,proto3" json:"bits,omitempty"`
	// contains filtered or unexported fields
}

func (*IP4Response) Descriptor deprecated

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

Deprecated: Use IP4Response.ProtoReflect.Descriptor instead.

func (*IP4Response) GetBits

func (x *IP4Response) GetBits() int32

func (*IP4Response) GetIpv4

func (x *IP4Response) GetIpv4() string

func (*IP4Response) ProtoMessage

func (*IP4Response) ProtoMessage()

func (*IP4Response) ProtoReflect

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

func (*IP4Response) Reset

func (x *IP4Response) Reset()

func (*IP4Response) String

func (x *IP4Response) String() string

type NodeConfig

type NodeConfig struct {
	Name        string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Mac         string      `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"`
	Netdev      string      `protobuf:"bytes,3,opt,name=netdev,proto3" json:"netdev,omitempty"`
	Ipv4        string      `protobuf:"bytes,4,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Ignition    string      `protobuf:"bytes,5,opt,name=ignition,proto3" json:"ignition,omitempty"`
	Power       string      `protobuf:"bytes,6,opt,name=power,proto3" json:"power,omitempty"`
	Alias       []string    `protobuf:"bytes,7,rep,name=alias,proto3" json:"alias,omitempty"`
	Installdisk string      `protobuf:"bytes,8,opt,name=installdisk,proto3" json:"installdisk,omitempty"`
	Pxeargs     string      `protobuf:"bytes,9,opt,name=pxeargs,proto3" json:"pxeargs,omitempty"`
	Firmware    PxeFirmware `protobuf:"varint,10,opt,name=firmware,proto3,enum=groundcontrol.PxeFirmware" json:"firmware,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeConfig) Descriptor deprecated

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

Deprecated: Use NodeConfig.ProtoReflect.Descriptor instead.

func (*NodeConfig) FirmwareFile

func (n *NodeConfig) FirmwareFile() string

func (*NodeConfig) GetAlias

func (x *NodeConfig) GetAlias() []string

func (*NodeConfig) GetFirmware

func (x *NodeConfig) GetFirmware() PxeFirmware

func (*NodeConfig) GetIgnition

func (x *NodeConfig) GetIgnition() string

func (*NodeConfig) GetInstalldisk

func (x *NodeConfig) GetInstalldisk() string

func (*NodeConfig) GetIpv4

func (x *NodeConfig) GetIpv4() string

func (*NodeConfig) GetMac

func (x *NodeConfig) GetMac() string

func (*NodeConfig) GetName

func (x *NodeConfig) GetName() string

func (*NodeConfig) GetNetdev

func (x *NodeConfig) GetNetdev() string

func (*NodeConfig) GetPower

func (x *NodeConfig) GetPower() string

func (*NodeConfig) GetPxeargs

func (x *NodeConfig) GetPxeargs() string

func (*NodeConfig) IgnitionFile

func (n *NodeConfig) IgnitionFile() string

func (*NodeConfig) ProtoMessage

func (*NodeConfig) ProtoMessage()

func (*NodeConfig) ProtoReflect

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

func (*NodeConfig) Reset

func (x *NodeConfig) Reset()

func (*NodeConfig) String

func (x *NodeConfig) String() string

type PowerController

type PowerController struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are assignable to Config:
	//
	//	*PowerController_Raven
	Config isPowerController_Config `protobuf_oneof:"config"`
	// contains filtered or unexported fields
}

func (*PowerController) Descriptor deprecated

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

Deprecated: Use PowerController.ProtoReflect.Descriptor instead.

func (*PowerController) GetConfig

func (m *PowerController) GetConfig() isPowerController_Config

func (*PowerController) GetName

func (x *PowerController) GetName() string

func (*PowerController) GetRaven

func (x *PowerController) GetRaven() *RavenConfig

func (*PowerController) ProtoMessage

func (*PowerController) ProtoMessage()

func (*PowerController) ProtoReflect

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

func (*PowerController) Reset

func (x *PowerController) Reset()

func (*PowerController) String

func (x *PowerController) String() string

type PowerController_Raven

type PowerController_Raven struct {
	Raven *RavenConfig `protobuf:"bytes,2,opt,name=raven,proto3,oneof"`
}

type PowerRequest

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

func (*PowerRequest) Descriptor deprecated

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

Deprecated: Use PowerRequest.ProtoReflect.Descriptor instead.

func (*PowerRequest) ProtoMessage

func (*PowerRequest) ProtoMessage()

func (*PowerRequest) ProtoReflect

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

func (*PowerRequest) Reset

func (x *PowerRequest) Reset()

func (*PowerRequest) String

func (x *PowerRequest) String() string

type PowerResponse

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

func (*PowerResponse) Descriptor deprecated

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

Deprecated: Use PowerResponse.ProtoReflect.Descriptor instead.

func (*PowerResponse) ProtoMessage

func (*PowerResponse) ProtoMessage()

func (*PowerResponse) ProtoReflect

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

func (*PowerResponse) Reset

func (x *PowerResponse) Reset()

func (*PowerResponse) String

func (x *PowerResponse) String() string

type PxeFirmware

type PxeFirmware int32
const (
	PxeFirmware_UEFI   PxeFirmware = 0
	PxeFirmware_LEGACY PxeFirmware = 1
)

func (PxeFirmware) Descriptor

func (PxeFirmware) Enum

func (x PxeFirmware) Enum() *PxeFirmware

func (PxeFirmware) EnumDescriptor deprecated

func (PxeFirmware) EnumDescriptor() ([]byte, []int)

Deprecated: Use PxeFirmware.Descriptor instead.

func (PxeFirmware) MarshalYAML

func (f PxeFirmware) MarshalYAML() (interface{}, error)

func (PxeFirmware) Number

func (x PxeFirmware) Number() protoreflect.EnumNumber

func (PxeFirmware) String

func (x PxeFirmware) String() string

func (PxeFirmware) Type

func (*PxeFirmware) UnmarshalYAML

func (f *PxeFirmware) UnmarshalYAML(unmarshal func(interface{}) error) error

type RavenConfig

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

func (*RavenConfig) Descriptor deprecated

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

Deprecated: Use RavenConfig.ProtoReflect.Descriptor instead.

func (*RavenConfig) GetAddress

func (x *RavenConfig) GetAddress() string

func (*RavenConfig) ProtoMessage

func (*RavenConfig) ProtoMessage()

func (*RavenConfig) ProtoReflect

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

func (*RavenConfig) Reset

func (x *RavenConfig) Reset()

func (*RavenConfig) String

func (x *RavenConfig) String() string

type StatusRequest

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

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

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

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type SwitchConfig

type SwitchConfig struct {
	Name  string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Mac   string   `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"`
	Ipv4  string   `protobuf:"bytes,3,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Ztp   string   `protobuf:"bytes,4,opt,name=ztp,proto3" json:"ztp,omitempty"`
	Power string   `protobuf:"bytes,5,opt,name=power,proto3" json:"power,omitempty"`
	Alias []string `protobuf:"bytes,8,rep,name=alias,proto3" json:"alias,omitempty"`
	// contains filtered or unexported fields
}

func (*SwitchConfig) Descriptor deprecated

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

Deprecated: Use SwitchConfig.ProtoReflect.Descriptor instead.

func (*SwitchConfig) GetAlias

func (x *SwitchConfig) GetAlias() []string

func (*SwitchConfig) GetIpv4

func (x *SwitchConfig) GetIpv4() string

func (*SwitchConfig) GetMac

func (x *SwitchConfig) GetMac() string

func (*SwitchConfig) GetName

func (x *SwitchConfig) GetName() string

func (*SwitchConfig) GetPower

func (x *SwitchConfig) GetPower() string

func (*SwitchConfig) GetZtp

func (x *SwitchConfig) GetZtp() string

func (*SwitchConfig) ProtoMessage

func (*SwitchConfig) ProtoMessage()

func (*SwitchConfig) ProtoReflect

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

func (*SwitchConfig) Reset

func (x *SwitchConfig) Reset()

func (*SwitchConfig) String

func (x *SwitchConfig) String() string

func (*SwitchConfig) ZtpFile

func (n *SwitchConfig) ZtpFile() string

type UnimplementedGroundControlServer

type UnimplementedGroundControlServer struct {
}

UnimplementedGroundControlServer can be embedded to have forward compatible implementations.

func (*UnimplementedGroundControlServer) AddDance4Entry

func (*UnimplementedGroundControlServer) Configure

func (*UnimplementedGroundControlServer) DelDance4Entry

func (*UnimplementedGroundControlServer) FreeIP4

func (*UnimplementedGroundControlServer) NewIP4

func (*UnimplementedGroundControlServer) Power

func (*UnimplementedGroundControlServer) Status

Jump to

Keyboard shortcuts

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