v1

package
v0.0.0-...-d510c65 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	SlaveService_Register_FullMethodName = "/slave.v1.SlaveService/Register"
)

Variables

View Source
var File_proto_slave_v1_slave_proto protoreflect.FileDescriptor
View Source
var SlaveService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "slave.v1.SlaveService",
	HandlerType: (*SlaveServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _SlaveService_Register_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/slave/v1/slave.proto",
}

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

Functions

func RegisterSlaveServiceHandler

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

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

func RegisterSlaveServiceHandlerClient

func RegisterSlaveServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlaveServiceClient) error

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

func RegisterSlaveServiceHandlerFromEndpoint

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

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

func RegisterSlaveServiceHandlerServer

func RegisterSlaveServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlaveServiceServer) error

RegisterSlaveServiceHandlerServer registers the http handlers for service SlaveService to "mux". UnaryRPC :call SlaveServiceServer 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 RegisterSlaveServiceHandlerFromEndpoint instead.

func RegisterSlaveServiceServer

func RegisterSlaveServiceServer(s grpc.ServiceRegistrar, srv SlaveServiceServer)

Types

type Authn

type Authn struct {
	Method    string     `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Preshared *Preshared `protobuf:"bytes,2,opt,name=preshared,proto3" json:"preshared,omitempty"`
	// contains filtered or unexported fields
}

func (*Authn) Descriptor deprecated

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

Deprecated: Use Authn.ProtoReflect.Descriptor instead.

func (*Authn) GetMethod

func (x *Authn) GetMethod() string

func (*Authn) GetPreshared

func (x *Authn) GetPreshared() *Preshared

func (*Authn) ProtoMessage

func (*Authn) ProtoMessage()

func (*Authn) ProtoReflect

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

func (*Authn) Reset

func (x *Authn) Reset()

func (*Authn) String

func (x *Authn) String() string

type Preshared

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

func (*Preshared) Descriptor deprecated

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

Deprecated: Use Preshared.ProtoReflect.Descriptor instead.

func (*Preshared) GetKey

func (x *Preshared) GetKey() string

func (*Preshared) ProtoMessage

func (*Preshared) ProtoMessage()

func (*Preshared) ProtoReflect

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

func (*Preshared) Reset

func (x *Preshared) Reset()

func (*Preshared) String

func (x *Preshared) String() string

type RegisterRequest

type RegisterRequest struct {
	Id            string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Address       string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	TlsEnabled    bool     `protobuf:"varint,3,opt,name=tls_enabled,json=tlsEnabled,proto3" json:"tls_enabled,omitempty"`
	ValidationIds []string `protobuf:"bytes,4,rep,name=validation_ids,json=validationIds,proto3" json:"validation_ids,omitempty"`
	Authn         *Authn   `protobuf:"bytes,5,opt,name=authn,proto3" json:"authn,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAddress

func (x *RegisterRequest) GetAddress() string

func (*RegisterRequest) GetAuthn

func (x *RegisterRequest) GetAuthn() *Authn

func (*RegisterRequest) GetId

func (x *RegisterRequest) GetId() string

func (*RegisterRequest) GetTlsEnabled

func (x *RegisterRequest) GetTlsEnabled() bool

func (*RegisterRequest) GetValidationIds

func (x *RegisterRequest) GetValidationIds() []string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

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

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type SlaveServiceClient

type SlaveServiceClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
}

SlaveServiceClient is the client API for SlaveService 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 SlaveServiceServer

type SlaveServiceServer interface {
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// contains filtered or unexported methods
}

SlaveServiceServer is the server API for SlaveService service. All implementations must embed UnimplementedSlaveServiceServer for forward compatibility

type UnimplementedSlaveServiceServer

type UnimplementedSlaveServiceServer struct {
}

UnimplementedSlaveServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSlaveServiceServer) Register

type UnsafeSlaveServiceServer

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

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

Jump to

Keyboard shortcuts

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