vmproto

package
v0.0.0-...-97303f7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

README

Proto generation

To generate Go source files from proto, we use docker.

The following command will generate Go source code files in docker and save the output to the current directory. Run this once every time you make any changes or additions to the .proto files. Add the generated .go files, and any changes to the .proto files, to your branch before creating a PR.

DOCKER_BUILDKIT=1 docker build -o .. -f Dockerfile.gen-proto ..

Documentation

Index

Constants

View Source
const (
	API_GetJoinDataKube_FullMethodName = "/vmapi.API/GetJoinDataKube"
	API_InitFirstMaster_FullMethodName = "/vmapi.API/InitFirstMaster"
)

Variables

View Source
var API_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "vmapi.API",
	HandlerType: (*APIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetJoinDataKube",
			Handler:    _API_GetJoinDataKube_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "InitFirstMaster",
			Handler:       _API_InitFirstMaster_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "vmapi.proto",
}

API_ServiceDesc is the grpc.ServiceDesc for API service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_vmapi_proto protoreflect.FileDescriptor

Functions

func RegisterAPIServer

func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)

Types

type APIClient

type APIClient interface {
	GetJoinDataKube(ctx context.Context, in *GetJoinDataKubeRequest, opts ...grpc.CallOption) (*GetJoinDataKubeResponse, error)
	InitFirstMaster(ctx context.Context, in *InitFirstMasterRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InitFirstMasterResponse], error)
}

APIClient is the client API for API service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAPIClient

func NewAPIClient(cc grpc.ClientConnInterface) APIClient

type APIServer

type APIServer interface {
	GetJoinDataKube(context.Context, *GetJoinDataKubeRequest) (*GetJoinDataKubeResponse, error)
	InitFirstMaster(*InitFirstMasterRequest, grpc.ServerStreamingServer[InitFirstMasterResponse]) error
	// contains filtered or unexported methods
}

APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility.

type API_InitFirstMasterClient

type API_InitFirstMasterClient = grpc.ServerStreamingClient[InitFirstMasterResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type API_InitFirstMasterServer

type API_InitFirstMasterServer = grpc.ServerStreamingServer[InitFirstMasterResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type File

type File struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetContent

func (x *File) GetContent() []byte

func (*File) GetName

func (x *File) GetName() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

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

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type GetJoinDataKubeRequest

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

func (*GetJoinDataKubeRequest) Descriptor deprecated

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

Deprecated: Use GetJoinDataKubeRequest.ProtoReflect.Descriptor instead.

func (*GetJoinDataKubeRequest) ProtoMessage

func (*GetJoinDataKubeRequest) ProtoMessage()

func (*GetJoinDataKubeRequest) ProtoReflect

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

func (*GetJoinDataKubeRequest) Reset

func (x *GetJoinDataKubeRequest) Reset()

func (*GetJoinDataKubeRequest) String

func (x *GetJoinDataKubeRequest) String() string

type GetJoinDataKubeResponse

type GetJoinDataKubeResponse struct {
	JoinToken *JoinToken `protobuf:"bytes,1,opt,name=joinToken,proto3" json:"joinToken,omitempty"`
	Files     []*File    `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

func (*GetJoinDataKubeResponse) Descriptor deprecated

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

Deprecated: Use GetJoinDataKubeResponse.ProtoReflect.Descriptor instead.

func (*GetJoinDataKubeResponse) GetFiles

func (x *GetJoinDataKubeResponse) GetFiles() []*File

func (*GetJoinDataKubeResponse) GetJoinToken

func (x *GetJoinDataKubeResponse) GetJoinToken() *JoinToken

func (*GetJoinDataKubeResponse) ProtoMessage

func (*GetJoinDataKubeResponse) ProtoMessage()

func (*GetJoinDataKubeResponse) ProtoReflect

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

func (*GetJoinDataKubeResponse) Reset

func (x *GetJoinDataKubeResponse) Reset()

func (*GetJoinDataKubeResponse) String

func (x *GetJoinDataKubeResponse) String() string

type InitFirstMasterRequest

type InitFirstMasterRequest struct {
	Command string   `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	Args    []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	Tty     bool     `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"`
	// contains filtered or unexported fields
}

func (*InitFirstMasterRequest) Descriptor deprecated

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

Deprecated: Use InitFirstMasterRequest.ProtoReflect.Descriptor instead.

func (*InitFirstMasterRequest) GetArgs

func (x *InitFirstMasterRequest) GetArgs() []string

func (*InitFirstMasterRequest) GetCommand

func (x *InitFirstMasterRequest) GetCommand() string

func (*InitFirstMasterRequest) GetTty

func (x *InitFirstMasterRequest) GetTty() bool

func (*InitFirstMasterRequest) ProtoMessage

func (*InitFirstMasterRequest) ProtoMessage()

func (*InitFirstMasterRequest) ProtoReflect

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

func (*InitFirstMasterRequest) Reset

func (x *InitFirstMasterRequest) Reset()

func (*InitFirstMasterRequest) String

func (x *InitFirstMasterRequest) String() string

type InitFirstMasterResponse

type InitFirstMasterResponse struct {

	// Types that are assignable to Content:
	//
	//	*InitFirstMasterResponse_Output
	//	*InitFirstMasterResponse_Log
	Content isInitFirstMasterResponse_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

func (*InitFirstMasterResponse) Descriptor deprecated

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

Deprecated: Use InitFirstMasterResponse.ProtoReflect.Descriptor instead.

func (*InitFirstMasterResponse) GetContent

func (m *InitFirstMasterResponse) GetContent() isInitFirstMasterResponse_Content

func (*InitFirstMasterResponse) GetLog

func (x *InitFirstMasterResponse) GetLog() *Log

func (*InitFirstMasterResponse) GetOutput

func (x *InitFirstMasterResponse) GetOutput() []byte

func (*InitFirstMasterResponse) ProtoMessage

func (*InitFirstMasterResponse) ProtoMessage()

func (*InitFirstMasterResponse) ProtoReflect

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

func (*InitFirstMasterResponse) Reset

func (x *InitFirstMasterResponse) Reset()

func (*InitFirstMasterResponse) String

func (x *InitFirstMasterResponse) String() string

type InitFirstMasterResponse_Log

type InitFirstMasterResponse_Log struct {
	Log *Log `protobuf:"bytes,2,opt,name=log,proto3,oneof"`
}

type InitFirstMasterResponse_Output

type InitFirstMasterResponse_Output struct {
	Output []byte `protobuf:"bytes,1,opt,name=output,proto3,oneof"`
}

type JoinToken

type JoinToken struct {
	Token             string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	CaCertHash        string `protobuf:"bytes,2,opt,name=caCertHash,proto3" json:"caCertHash,omitempty"`
	ApiServerEndpoint string `protobuf:"bytes,3,opt,name=apiServerEndpoint,proto3" json:"apiServerEndpoint,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinToken) Descriptor deprecated

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

Deprecated: Use JoinToken.ProtoReflect.Descriptor instead.

func (*JoinToken) GetApiServerEndpoint

func (x *JoinToken) GetApiServerEndpoint() string

func (*JoinToken) GetCaCertHash

func (x *JoinToken) GetCaCertHash() string

func (*JoinToken) GetToken

func (x *JoinToken) GetToken() string

func (*JoinToken) ProtoMessage

func (*JoinToken) ProtoMessage()

func (*JoinToken) ProtoReflect

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

func (*JoinToken) Reset

func (x *JoinToken) Reset()

func (*JoinToken) String

func (x *JoinToken) String() string

type Log

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

func (*Log) Descriptor deprecated

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

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetMessage

func (x *Log) GetMessage() string

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

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

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type UnimplementedAPIServer

type UnimplementedAPIServer struct{}

UnimplementedAPIServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAPIServer) GetJoinDataKube

type UnsafeAPIServer

type UnsafeAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIServer will result in compilation errors.

Jump to

Keyboard shortcuts

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