peersv1

package
v0.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package peersv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Code generated by protoc-gen-deepcopy. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var File_aperture_common_peers_v1_peers_proto protoreflect.FileDescriptor
View Source
var PeerDiscoveryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aperture.common.peers.v1.PeerDiscoveryService",
	HandlerType: (*PeerDiscoveryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPeers",
			Handler:    _PeerDiscoveryService_GetPeers_Handler,
		},
		{
			MethodName: "GetPeer",
			Handler:    _PeerDiscoveryService_GetPeer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aperture/common/peers/v1/peers.proto",
}

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

Functions

func RegisterPeerDiscoveryServiceHandler added in v0.2.1

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

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

func RegisterPeerDiscoveryServiceHandlerClient added in v0.2.1

func RegisterPeerDiscoveryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerDiscoveryServiceClient) error

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

func RegisterPeerDiscoveryServiceHandlerFromEndpoint added in v0.2.1

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

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

func RegisterPeerDiscoveryServiceHandlerServer added in v0.2.1

func RegisterPeerDiscoveryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerDiscoveryServiceServer) error

RegisterPeerDiscoveryServiceHandlerServer registers the http handlers for service PeerDiscoveryService to "mux". UnaryRPC :call PeerDiscoveryServiceServer 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 RegisterPeerDiscoveryServiceHandlerFromEndpoint instead.

func RegisterPeerDiscoveryServiceServer added in v0.2.1

func RegisterPeerDiscoveryServiceServer(s grpc.ServiceRegistrar, srv PeerDiscoveryServiceServer)

Types

type Peer added in v0.2.1

type Peer struct {
	Address  string            `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Hostname string            `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Services map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

Peer holds peer info and services.

func (*Peer) DeepCopy added in v0.2.1

func (in *Peer) DeepCopy() *Peer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Peer. Required by controller-gen.

func (*Peer) DeepCopyInterface added in v0.2.1

func (in *Peer) DeepCopyInterface() interface{}

DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Peer. Required by controller-gen.

func (*Peer) DeepCopyInto added in v0.2.1

func (in *Peer) DeepCopyInto(out *Peer)

DeepCopyInto supports using Peer within kubernetes types, where deepcopy-gen is used.

func (*Peer) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetAddress added in v0.2.1

func (x *Peer) GetAddress() string

func (*Peer) GetHostname added in v0.2.1

func (x *Peer) GetHostname() string

func (*Peer) GetServices added in v0.2.1

func (x *Peer) GetServices() map[string]string

func (*Peer) MarshalJSON added in v0.2.1

func (msg *Peer) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Peer) ProtoMessage added in v0.2.1

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect added in v0.2.1

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

func (*Peer) Reset added in v0.2.1

func (x *Peer) Reset()

func (*Peer) String added in v0.2.1

func (x *Peer) String() string

func (*Peer) UnmarshalJSON added in v0.2.1

func (msg *Peer) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type PeerDiscoveryServiceClient added in v0.2.1

type PeerDiscoveryServiceClient interface {
	GetPeers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Peers, error)
	GetPeer(ctx context.Context, in *PeerRequest, opts ...grpc.CallOption) (*Peer, error)
}

PeerDiscoveryServiceClient is the client API for PeerDiscoveryService 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 NewPeerDiscoveryServiceClient added in v0.2.1

func NewPeerDiscoveryServiceClient(cc grpc.ClientConnInterface) PeerDiscoveryServiceClient

type PeerDiscoveryServiceServer added in v0.2.1

type PeerDiscoveryServiceServer interface {
	GetPeers(context.Context, *emptypb.Empty) (*Peers, error)
	GetPeer(context.Context, *PeerRequest) (*Peer, error)
}

PeerDiscoveryServiceServer is the server API for PeerDiscoveryService service. All implementations should embed UnimplementedPeerDiscoveryServiceServer for forward compatibility

type PeerRequest added in v0.2.1

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

func (*PeerRequest) DeepCopy added in v0.2.1

func (in *PeerRequest) DeepCopy() *PeerRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PeerRequest. Required by controller-gen.

func (*PeerRequest) DeepCopyInterface added in v0.2.1

func (in *PeerRequest) DeepCopyInterface() interface{}

DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PeerRequest. Required by controller-gen.

func (*PeerRequest) DeepCopyInto added in v0.2.1

func (in *PeerRequest) DeepCopyInto(out *PeerRequest)

DeepCopyInto supports using PeerRequest within kubernetes types, where deepcopy-gen is used.

func (*PeerRequest) Descriptor deprecated added in v0.2.1

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

Deprecated: Use PeerRequest.ProtoReflect.Descriptor instead.

func (*PeerRequest) GetAddress added in v0.2.1

func (x *PeerRequest) GetAddress() string

func (*PeerRequest) MarshalJSON added in v0.2.1

func (msg *PeerRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*PeerRequest) ProtoMessage added in v0.2.1

func (*PeerRequest) ProtoMessage()

func (*PeerRequest) ProtoReflect added in v0.2.1

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

func (*PeerRequest) Reset added in v0.2.1

func (x *PeerRequest) Reset()

func (*PeerRequest) String added in v0.2.1

func (x *PeerRequest) String() string

func (*PeerRequest) UnmarshalJSON added in v0.2.1

func (msg *PeerRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Peers

type Peers struct {
	SelfPeer *Peer            `protobuf:"bytes,1,opt,name=self_peer,json=selfPeer,proto3" json:"self_peer,omitempty"`
	Peers    map[string]*Peer `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Peers holds the peer info of this peer and a mapping of address to other peers.

func (*Peers) DeepCopy added in v0.1.2

func (in *Peers) DeepCopy() *Peers

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Peers. Required by controller-gen.

func (*Peers) DeepCopyInterface added in v0.1.2

func (in *Peers) DeepCopyInterface() interface{}

DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Peers. Required by controller-gen.

func (*Peers) DeepCopyInto added in v0.1.2

func (in *Peers) DeepCopyInto(out *Peers)

DeepCopyInto supports using Peers within kubernetes types, where deepcopy-gen is used.

func (*Peers) Descriptor deprecated

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

Deprecated: Use Peers.ProtoReflect.Descriptor instead.

func (*Peers) GetPeers added in v0.2.1

func (x *Peers) GetPeers() map[string]*Peer

func (*Peers) GetSelfPeer added in v0.2.1

func (x *Peers) GetSelfPeer() *Peer

func (*Peers) MarshalJSON

func (msg *Peers) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Peers) ProtoMessage

func (*Peers) ProtoMessage()

func (*Peers) ProtoReflect

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

func (*Peers) Reset

func (x *Peers) Reset()

func (*Peers) String

func (x *Peers) String() string

func (*Peers) UnmarshalJSON

func (msg *Peers) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type UnimplementedPeerDiscoveryServiceServer added in v0.2.1

type UnimplementedPeerDiscoveryServiceServer struct {
}

UnimplementedPeerDiscoveryServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedPeerDiscoveryServiceServer) GetPeer added in v0.2.1

func (UnimplementedPeerDiscoveryServiceServer) GetPeers added in v0.2.1

type UnsafePeerDiscoveryServiceServer added in v0.2.1

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

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

Jump to

Keyboard shortcuts

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