lg_operator

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package lg_operator is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_lg_operator_lg_operator_proto protoreflect.FileDescriptor
View Source
var LoadGeneratorOperatorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lg_operator.LoadGeneratorOperatorService",
	HandlerType: (*LoadGeneratorOperatorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Hello",
			Handler:    _LoadGeneratorOperatorService_Hello_Handler,
		},
		{
			MethodName: "CreateGenerators",
			Handler:    _LoadGeneratorOperatorService_CreateGenerators_Handler,
		},
		{
			MethodName: "DeleteGenerators",
			Handler:    _LoadGeneratorOperatorService_DeleteGenerators_Handler,
		},
		{
			MethodName: "GeneratorsList",
			Handler:    _LoadGeneratorOperatorService_GeneratorsList_Handler,
		},
		{
			MethodName: "ClearAll",
			Handler:    _LoadGeneratorOperatorService_ClearAll_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "lg-operator/lg-operator.proto",
}

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

Functions

func RegisterLoadGeneratorOperatorServiceHandler

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

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

func RegisterLoadGeneratorOperatorServiceHandlerClient

func RegisterLoadGeneratorOperatorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LoadGeneratorOperatorServiceClient) error

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

func RegisterLoadGeneratorOperatorServiceHandlerFromEndpoint

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

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

func RegisterLoadGeneratorOperatorServiceHandlerServer

func RegisterLoadGeneratorOperatorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LoadGeneratorOperatorServiceServer) error

RegisterLoadGeneratorOperatorServiceHandlerServer registers the http handlers for service LoadGeneratorOperatorService to "mux". UnaryRPC :call LoadGeneratorOperatorServiceServer 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 RegisterLoadGeneratorOperatorServiceHandlerFromEndpoint instead.

func RegisterLoadGeneratorOperatorServiceServer

func RegisterLoadGeneratorOperatorServiceServer(s grpc.ServiceRegistrar, srv LoadGeneratorOperatorServiceServer)

Types

type CreateGeneratorsParams

type CreateGeneratorsParams struct {
	Image            string     `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	Resources        *Resources `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"`
	AdditionalEnvs   []*EnvVar  `protobuf:"bytes,3,rep,name=additional_envs,json=additionalEnvs,proto3" json:"additional_envs,omitempty"`
	Commands         []string   `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"`
	ExposeExternalIp bool       `protobuf:"varint,5,opt,name=expose_external_ip,json=exposeExternalIp,proto3" json:"expose_external_ip,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateGeneratorsParams) Descriptor deprecated

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

Deprecated: Use CreateGeneratorsParams.ProtoReflect.Descriptor instead.

func (*CreateGeneratorsParams) GetAdditionalEnvs

func (x *CreateGeneratorsParams) GetAdditionalEnvs() []*EnvVar

func (*CreateGeneratorsParams) GetCommands

func (x *CreateGeneratorsParams) GetCommands() []string

func (*CreateGeneratorsParams) GetExposeExternalIp

func (x *CreateGeneratorsParams) GetExposeExternalIp() bool

func (*CreateGeneratorsParams) GetImage

func (x *CreateGeneratorsParams) GetImage() string

func (*CreateGeneratorsParams) GetResources

func (x *CreateGeneratorsParams) GetResources() *Resources

func (*CreateGeneratorsParams) ProtoMessage

func (*CreateGeneratorsParams) ProtoMessage()

func (*CreateGeneratorsParams) ProtoReflect

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

func (*CreateGeneratorsParams) Reset

func (x *CreateGeneratorsParams) Reset()

func (*CreateGeneratorsParams) String

func (x *CreateGeneratorsParams) String() string

type CreateGeneratorsRequest

type CreateGeneratorsRequest struct {
	Parameters []*CreateGeneratorsParams `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateGeneratorsRequest) Descriptor deprecated

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

Deprecated: Use CreateGeneratorsRequest.ProtoReflect.Descriptor instead.

func (*CreateGeneratorsRequest) GetParameters

func (x *CreateGeneratorsRequest) GetParameters() []*CreateGeneratorsParams

func (*CreateGeneratorsRequest) ProtoMessage

func (*CreateGeneratorsRequest) ProtoMessage()

func (*CreateGeneratorsRequest) ProtoReflect

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

func (*CreateGeneratorsRequest) Reset

func (x *CreateGeneratorsRequest) Reset()

func (*CreateGeneratorsRequest) String

func (x *CreateGeneratorsRequest) String() string

type CreateGeneratorsResponse

type CreateGeneratorsResponse struct {
	LoadGenerators []*LoadGenerator `protobuf:"bytes,1,rep,name=load_generators,json=loadGenerators,proto3" json:"load_generators,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateGeneratorsResponse) Descriptor deprecated

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

Deprecated: Use CreateGeneratorsResponse.ProtoReflect.Descriptor instead.

func (*CreateGeneratorsResponse) GetLoadGenerators

func (x *CreateGeneratorsResponse) GetLoadGenerators() []*LoadGenerator

func (*CreateGeneratorsResponse) ProtoMessage

func (*CreateGeneratorsResponse) ProtoMessage()

func (*CreateGeneratorsResponse) ProtoReflect

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

func (*CreateGeneratorsResponse) Reset

func (x *CreateGeneratorsResponse) Reset()

func (*CreateGeneratorsResponse) String

func (x *CreateGeneratorsResponse) String() string

type DeleteGeneratorsRequest

type DeleteGeneratorsRequest struct {
	Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteGeneratorsRequest) Descriptor deprecated

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

Deprecated: Use DeleteGeneratorsRequest.ProtoReflect.Descriptor instead.

func (*DeleteGeneratorsRequest) GetNames

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

func (*DeleteGeneratorsRequest) ProtoMessage

func (*DeleteGeneratorsRequest) ProtoMessage()

func (*DeleteGeneratorsRequest) ProtoReflect

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

func (*DeleteGeneratorsRequest) Reset

func (x *DeleteGeneratorsRequest) Reset()

func (*DeleteGeneratorsRequest) String

func (x *DeleteGeneratorsRequest) String() string

type DeleteGeneratorsResponse

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

func (*DeleteGeneratorsResponse) Descriptor deprecated

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

Deprecated: Use DeleteGeneratorsResponse.ProtoReflect.Descriptor instead.

func (*DeleteGeneratorsResponse) ProtoMessage

func (*DeleteGeneratorsResponse) ProtoMessage()

func (*DeleteGeneratorsResponse) ProtoReflect

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

func (*DeleteGeneratorsResponse) Reset

func (x *DeleteGeneratorsResponse) Reset()

func (*DeleteGeneratorsResponse) String

func (x *DeleteGeneratorsResponse) String() string

type EnvVar

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

func (*EnvVar) Descriptor deprecated

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

Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.

func (*EnvVar) GetName

func (x *EnvVar) GetName() string

func (*EnvVar) GetVal

func (x *EnvVar) GetVal() string

func (*EnvVar) ProtoMessage

func (*EnvVar) ProtoMessage()

func (*EnvVar) ProtoReflect

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

func (*EnvVar) Reset

func (x *EnvVar) Reset()

func (*EnvVar) String

func (x *EnvVar) String() string

type GeneratorsListRequest

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

func (*GeneratorsListRequest) Descriptor deprecated

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

Deprecated: Use GeneratorsListRequest.ProtoReflect.Descriptor instead.

func (*GeneratorsListRequest) ProtoMessage

func (*GeneratorsListRequest) ProtoMessage()

func (*GeneratorsListRequest) ProtoReflect

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

func (*GeneratorsListRequest) Reset

func (x *GeneratorsListRequest) Reset()

func (*GeneratorsListRequest) String

func (x *GeneratorsListRequest) String() string

type GeneratorsListResponse

type GeneratorsListResponse struct {
	LoadGenerators []*LoadGenerator `protobuf:"bytes,1,rep,name=load_generators,json=loadGenerators,proto3" json:"load_generators,omitempty"`
	// contains filtered or unexported fields
}

func (*GeneratorsListResponse) Descriptor deprecated

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

Deprecated: Use GeneratorsListResponse.ProtoReflect.Descriptor instead.

func (*GeneratorsListResponse) GetLoadGenerators

func (x *GeneratorsListResponse) GetLoadGenerators() []*LoadGenerator

func (*GeneratorsListResponse) ProtoMessage

func (*GeneratorsListResponse) ProtoMessage()

func (*GeneratorsListResponse) ProtoReflect

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

func (*GeneratorsListResponse) Reset

func (x *GeneratorsListResponse) Reset()

func (*GeneratorsListResponse) String

func (x *GeneratorsListResponse) String() string

type HelloRequest

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

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type HelloResponse

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

func (*HelloResponse) Descriptor deprecated

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

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetHello

func (x *HelloResponse) GetHello() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

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

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

type LoadGenerator

type LoadGenerator struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	ClusterIp  string `protobuf:"bytes,2,opt,name=cluster_ip,json=clusterIp,proto3" json:"cluster_ip,omitempty"`
	ExternalIp string `protobuf:"bytes,3,opt,name=external_ip,json=externalIp,proto3" json:"external_ip,omitempty"`
	Port       int32  `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	Status     string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadGenerator) Descriptor deprecated

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

Deprecated: Use LoadGenerator.ProtoReflect.Descriptor instead.

func (*LoadGenerator) GetClusterIp

func (x *LoadGenerator) GetClusterIp() string

func (*LoadGenerator) GetExternalIp

func (x *LoadGenerator) GetExternalIp() string

func (*LoadGenerator) GetName

func (x *LoadGenerator) GetName() string

func (*LoadGenerator) GetPort

func (x *LoadGenerator) GetPort() int32

func (*LoadGenerator) GetStatus

func (x *LoadGenerator) GetStatus() string

func (*LoadGenerator) ProtoMessage

func (*LoadGenerator) ProtoMessage()

func (*LoadGenerator) ProtoReflect

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

func (*LoadGenerator) Reset

func (x *LoadGenerator) Reset()

func (*LoadGenerator) String

func (x *LoadGenerator) String() string

type LoadGeneratorOperatorServiceClient

type LoadGeneratorOperatorServiceClient interface {
	// Debug entrypoint.
	Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
	// Create pod, service and ingress of load-generator according to the passed parameters.
	CreateGenerators(ctx context.Context, in *CreateGeneratorsRequest, opts ...grpc.CallOption) (*CreateGeneratorsResponse, error)
	// Delete pod, service and ingress by load-generator name.
	DeleteGenerators(ctx context.Context, in *DeleteGeneratorsRequest, opts ...grpc.CallOption) (*DeleteGeneratorsResponse, error)
	// Get list of all load-generators in cluster.
	GeneratorsList(ctx context.Context, in *GeneratorsListRequest, opts ...grpc.CallOption) (*GeneratorsListResponse, error)
	// Delete all pods, services and ingresses of generators. Use carefully!
	ClearAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

LoadGeneratorOperatorServiceClient is the client API for LoadGeneratorOperatorService 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.

type LoadGeneratorOperatorServiceServer

type LoadGeneratorOperatorServiceServer interface {
	// Debug entrypoint.
	Hello(context.Context, *HelloRequest) (*HelloResponse, error)
	// Create pod, service and ingress of load-generator according to the passed parameters.
	CreateGenerators(context.Context, *CreateGeneratorsRequest) (*CreateGeneratorsResponse, error)
	// Delete pod, service and ingress by load-generator name.
	DeleteGenerators(context.Context, *DeleteGeneratorsRequest) (*DeleteGeneratorsResponse, error)
	// Get list of all load-generators in cluster.
	GeneratorsList(context.Context, *GeneratorsListRequest) (*GeneratorsListResponse, error)
	// Delete all pods, services and ingresses of generators. Use carefully!
	ClearAll(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

LoadGeneratorOperatorServiceServer is the server API for LoadGeneratorOperatorService service. All implementations must embed UnimplementedLoadGeneratorOperatorServiceServer for forward compatibility

type Resource

type Resource struct {
	Limit   string `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Request string `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetLimit

func (x *Resource) GetLimit() string

func (*Resource) GetRequest

func (x *Resource) GetRequest() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Resources

type Resources struct {
	Memory *Resource `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"`
	Cpu    *Resource `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"`
	// contains filtered or unexported fields
}

func (*Resources) Descriptor deprecated

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

Deprecated: Use Resources.ProtoReflect.Descriptor instead.

func (*Resources) GetCpu

func (x *Resources) GetCpu() *Resource

func (*Resources) GetMemory

func (x *Resources) GetMemory() *Resource

func (*Resources) ProtoMessage

func (*Resources) ProtoMessage()

func (*Resources) ProtoReflect

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

func (*Resources) Reset

func (x *Resources) Reset()

func (*Resources) String

func (x *Resources) String() string

type UnimplementedLoadGeneratorOperatorServiceServer

type UnimplementedLoadGeneratorOperatorServiceServer struct {
}

UnimplementedLoadGeneratorOperatorServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLoadGeneratorOperatorServiceServer) ClearAll

func (UnimplementedLoadGeneratorOperatorServiceServer) CreateGenerators

func (UnimplementedLoadGeneratorOperatorServiceServer) DeleteGenerators

func (UnimplementedLoadGeneratorOperatorServiceServer) GeneratorsList

func (UnimplementedLoadGeneratorOperatorServiceServer) Hello

type UnsafeLoadGeneratorOperatorServiceServer

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

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

Jump to

Keyboard shortcuts

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