registry

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package registry is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRegistry        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRegistry          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRegistry = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterRegistryServiceHandler

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

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

func RegisterRegistryServiceHandlerClient

func RegisterRegistryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryServiceClient) error

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

func RegisterRegistryServiceHandlerFromEndpoint

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

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

func RegisterRegistryServiceHandlerServer

func RegisterRegistryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServiceServer) error

RegisterRegistryServiceHandlerServer registers the http handlers for service RegistryService to "mux". UnaryRPC :call RegistryServiceServer 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 RegisterRegistryServiceHandlerFromEndpoint instead.

func RegisterRegistryServiceServer

func RegisterRegistryServiceServer(s *grpc.Server, srv RegistryServiceServer)

Types

type PullRequest

type PullRequest struct {
	// The name of the environment to pull
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PullRequest a request to pull an environment

func (*PullRequest) Descriptor

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

func (*PullRequest) GetName

func (m *PullRequest) GetName() string

func (*PullRequest) Marshal

func (m *PullRequest) Marshal() (dAtA []byte, err error)

func (*PullRequest) MarshalTo

func (m *PullRequest) MarshalTo(dAtA []byte) (int, error)

func (*PullRequest) MarshalToSizedBuffer

func (m *PullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PullRequest) ProtoMessage

func (*PullRequest) ProtoMessage()

func (*PullRequest) Reset

func (m *PullRequest) Reset()

func (*PullRequest) Size

func (m *PullRequest) Size() (n int)

func (*PullRequest) String

func (m *PullRequest) String() string

func (*PullRequest) Unmarshal

func (m *PullRequest) Unmarshal(dAtA []byte) error

func (*PullRequest) XXX_DiscardUnknown

func (m *PullRequest) XXX_DiscardUnknown()

func (*PullRequest) XXX_Marshal

func (m *PullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PullRequest) XXX_Merge

func (m *PullRequest) XXX_Merge(src proto.Message)

func (*PullRequest) XXX_Size

func (m *PullRequest) XXX_Size() int

func (*PullRequest) XXX_Unmarshal

func (m *PullRequest) XXX_Unmarshal(b []byte) error

type PullResponse

type PullResponse struct {
	// Chunk of data
	Chunk                []byte   `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PullResponse a response for pull request

func (*PullResponse) Descriptor

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

func (*PullResponse) GetChunk

func (m *PullResponse) GetChunk() []byte

func (*PullResponse) Marshal

func (m *PullResponse) Marshal() (dAtA []byte, err error)

func (*PullResponse) MarshalTo

func (m *PullResponse) MarshalTo(dAtA []byte) (int, error)

func (*PullResponse) MarshalToSizedBuffer

func (m *PullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PullResponse) ProtoMessage

func (*PullResponse) ProtoMessage()

func (*PullResponse) Reset

func (m *PullResponse) Reset()

func (*PullResponse) Size

func (m *PullResponse) Size() (n int)

func (*PullResponse) String

func (m *PullResponse) String() string

func (*PullResponse) Unmarshal

func (m *PullResponse) Unmarshal(dAtA []byte) error

func (*PullResponse) XXX_DiscardUnknown

func (m *PullResponse) XXX_DiscardUnknown()

func (*PullResponse) XXX_Marshal

func (m *PullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PullResponse) XXX_Merge

func (m *PullResponse) XXX_Merge(src proto.Message)

func (*PullResponse) XXX_Size

func (m *PullResponse) XXX_Size() int

func (*PullResponse) XXX_Unmarshal

func (m *PullResponse) XXX_Unmarshal(b []byte) error

type RegistryServiceClient

type RegistryServiceClient interface {
	// Pull pulls an environment
	Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (RegistryService_PullClient, error)
}

RegistryServiceClient is the client API for RegistryService service.

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

func NewRegistryServiceClient

func NewRegistryServiceClient(cc *grpc.ClientConn) RegistryServiceClient

type RegistryServiceServer

type RegistryServiceServer interface {
	// Pull pulls an environment
	Pull(*PullRequest, RegistryService_PullServer) error
}

RegistryServiceServer is the server API for RegistryService service.

type RegistryService_PullClient

type RegistryService_PullClient interface {
	Recv() (*PullResponse, error)
	grpc.ClientStream
}

type RegistryService_PullServer

type RegistryService_PullServer interface {
	Send(*PullResponse) error
	grpc.ServerStream
}

type UnimplementedRegistryServiceServer

type UnimplementedRegistryServiceServer struct {
}

UnimplementedRegistryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRegistryServiceServer) Pull

Jump to

Keyboard shortcuts

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