v1

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 19 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 (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Cluster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Cluster",
	HandlerType: (*ClusterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ApplyCluster",
			Handler:    _Cluster_ApplyCluster_Handler,
		},
		{
			MethodName: "GetCluster",
			Handler:    _Cluster_GetCluster_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vince/cluster/v1/cluster.proto",
}

Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster 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_vince_cluster_v1_cluster_proto protoreflect.FileDescriptor

Functions

func RegisterClusterHandler

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

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

func RegisterClusterHandlerClient

func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterClient) error

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

func RegisterClusterHandlerFromEndpoint

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

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

func RegisterClusterHandlerServer

func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterServer) error

RegisterClusterHandlerServer registers the http handlers for service Cluster to "mux". UnaryRPC :call ClusterServer 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 RegisterClusterHandlerFromEndpoint instead.

func RegisterClusterServer

func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer)

Types

type ApplyClusterRequest

type ApplyClusterRequest struct {
	Config *v1.ClusterConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*ApplyClusterRequest) Descriptor deprecated

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

Deprecated: Use ApplyClusterRequest.ProtoReflect.Descriptor instead.

func (*ApplyClusterRequest) GetConfig

func (x *ApplyClusterRequest) GetConfig() *v1.ClusterConfig

func (*ApplyClusterRequest) MarshalToSizedBufferVT

func (m *ApplyClusterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ApplyClusterRequest) MarshalToVT

func (m *ApplyClusterRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ApplyClusterRequest) MarshalVT

func (m *ApplyClusterRequest) MarshalVT() (dAtA []byte, err error)

func (*ApplyClusterRequest) ProtoMessage

func (*ApplyClusterRequest) ProtoMessage()

func (*ApplyClusterRequest) ProtoReflect

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

func (*ApplyClusterRequest) Reset

func (x *ApplyClusterRequest) Reset()

func (*ApplyClusterRequest) SizeVT

func (m *ApplyClusterRequest) SizeVT() (n int)

func (*ApplyClusterRequest) String

func (x *ApplyClusterRequest) String() string

func (*ApplyClusterRequest) UnmarshalVT

func (m *ApplyClusterRequest) UnmarshalVT(dAtA []byte) error

type ApplyClusterResponse

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

func (*ApplyClusterResponse) Descriptor deprecated

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

Deprecated: Use ApplyClusterResponse.ProtoReflect.Descriptor instead.

func (*ApplyClusterResponse) GetOk

func (x *ApplyClusterResponse) GetOk() string

func (*ApplyClusterResponse) MarshalToSizedBufferVT

func (m *ApplyClusterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ApplyClusterResponse) MarshalToVT

func (m *ApplyClusterResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ApplyClusterResponse) MarshalVT

func (m *ApplyClusterResponse) MarshalVT() (dAtA []byte, err error)

func (*ApplyClusterResponse) ProtoMessage

func (*ApplyClusterResponse) ProtoMessage()

func (*ApplyClusterResponse) ProtoReflect

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

func (*ApplyClusterResponse) Reset

func (x *ApplyClusterResponse) Reset()

func (*ApplyClusterResponse) SizeVT

func (m *ApplyClusterResponse) SizeVT() (n int)

func (*ApplyClusterResponse) String

func (x *ApplyClusterResponse) String() string

func (*ApplyClusterResponse) UnmarshalVT

func (m *ApplyClusterResponse) UnmarshalVT(dAtA []byte) error

type ClusterClient

type ClusterClient interface {
	ApplyCluster(ctx context.Context, in *ApplyClusterRequest, opts ...grpc.CallOption) (*ApplyClusterResponse, error)
	GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*GetClusterResponse, error)
}

ClusterClient is the client API for Cluster 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 NewClusterClient

func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient

type ClusterServer

type ClusterServer interface {
	ApplyCluster(context.Context, *ApplyClusterRequest) (*ApplyClusterResponse, error)
	GetCluster(context.Context, *GetClusterRequest) (*GetClusterResponse, error)
	// contains filtered or unexported methods
}

ClusterServer is the server API for Cluster service. All implementations must embed UnimplementedClusterServer for forward compatibility

type GetClusterRequest

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

func (*GetClusterRequest) Descriptor deprecated

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

Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead.

func (*GetClusterRequest) MarshalToSizedBufferVT

func (m *GetClusterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*GetClusterRequest) MarshalToVT

func (m *GetClusterRequest) MarshalToVT(dAtA []byte) (int, error)

func (*GetClusterRequest) MarshalVT

func (m *GetClusterRequest) MarshalVT() (dAtA []byte, err error)

func (*GetClusterRequest) ProtoMessage

func (*GetClusterRequest) ProtoMessage()

func (*GetClusterRequest) ProtoReflect

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

func (*GetClusterRequest) Reset

func (x *GetClusterRequest) Reset()

func (*GetClusterRequest) SizeVT

func (m *GetClusterRequest) SizeVT() (n int)

func (*GetClusterRequest) String

func (x *GetClusterRequest) String() string

func (*GetClusterRequest) UnmarshalVT

func (m *GetClusterRequest) UnmarshalVT(dAtA []byte) error

type GetClusterResponse

type GetClusterResponse struct {
	Config *v1.ClusterConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClusterResponse) Descriptor deprecated

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

Deprecated: Use GetClusterResponse.ProtoReflect.Descriptor instead.

func (*GetClusterResponse) GetConfig

func (x *GetClusterResponse) GetConfig() *v1.ClusterConfig

func (*GetClusterResponse) MarshalToSizedBufferVT

func (m *GetClusterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*GetClusterResponse) MarshalToVT

func (m *GetClusterResponse) MarshalToVT(dAtA []byte) (int, error)

func (*GetClusterResponse) MarshalVT

func (m *GetClusterResponse) MarshalVT() (dAtA []byte, err error)

func (*GetClusterResponse) ProtoMessage

func (*GetClusterResponse) ProtoMessage()

func (*GetClusterResponse) ProtoReflect

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

func (*GetClusterResponse) Reset

func (x *GetClusterResponse) Reset()

func (*GetClusterResponse) SizeVT

func (m *GetClusterResponse) SizeVT() (n int)

func (*GetClusterResponse) String

func (x *GetClusterResponse) String() string

func (*GetClusterResponse) UnmarshalVT

func (m *GetClusterResponse) UnmarshalVT(dAtA []byte) error

type UnimplementedClusterServer

type UnimplementedClusterServer struct {
}

UnimplementedClusterServer must be embedded to have forward compatible implementations.

func (UnimplementedClusterServer) ApplyCluster

func (UnimplementedClusterServer) GetCluster

type UnsafeClusterServer

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

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

Jump to

Keyboard shortcuts

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