discoverynetwork

package
v0.0.0-...-dde4a86 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiscoveryNetworkService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "paranoid.discoverynetwork.v1.DiscoveryNetworkService",
	HandlerType: (*DiscoveryNetworkServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Join",
			Handler:    _DiscoveryNetworkService_Join_Handler,
		},
		{
			MethodName: "Disconnect",
			Handler:    _DiscoveryNetworkService_Disconnect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "paranoid/discoverynetwork/v1/discovery.proto",
}

DiscoveryNetworkService_ServiceDesc is the grpc.ServiceDesc for DiscoveryNetworkService 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_paranoid_discoverynetwork_v1_discovery_proto protoreflect.FileDescriptor

Functions

func RegisterDiscoveryNetworkServiceServer

func RegisterDiscoveryNetworkServiceServer(s grpc.ServiceRegistrar, srv DiscoveryNetworkServiceServer)

Types

type DisconnectRequest

type DisconnectRequest struct {
	Pool     string `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`         // required
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // optional
	Node     *Node  `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`         // required
	// contains filtered or unexported fields
}

func (*DisconnectRequest) Descriptor deprecated

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

Deprecated: Use DisconnectRequest.ProtoReflect.Descriptor instead.

func (*DisconnectRequest) GetNode

func (x *DisconnectRequest) GetNode() *Node

func (*DisconnectRequest) GetPassword

func (x *DisconnectRequest) GetPassword() string

func (*DisconnectRequest) GetPool

func (x *DisconnectRequest) GetPool() string

func (*DisconnectRequest) ProtoMessage

func (*DisconnectRequest) ProtoMessage()

func (*DisconnectRequest) ProtoReflect

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

func (*DisconnectRequest) Reset

func (x *DisconnectRequest) Reset()

func (*DisconnectRequest) String

func (x *DisconnectRequest) String() string

type DisconnectResponse

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

func (*DisconnectResponse) Descriptor deprecated

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

Deprecated: Use DisconnectResponse.ProtoReflect.Descriptor instead.

func (*DisconnectResponse) ProtoMessage

func (*DisconnectResponse) ProtoMessage()

func (*DisconnectResponse) ProtoReflect

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

func (*DisconnectResponse) Reset

func (x *DisconnectResponse) Reset()

func (*DisconnectResponse) String

func (x *DisconnectResponse) String() string

type DiscoveryNetworkServiceClient

type DiscoveryNetworkServiceClient interface {
	// Discovery Calls
	Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error)
	Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error)
}

DiscoveryNetworkServiceClient is the client API for DiscoveryNetworkService 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 DiscoveryNetworkServiceServer

type DiscoveryNetworkServiceServer interface {
	// Discovery Calls
	Join(context.Context, *JoinRequest) (*JoinResponse, error)
	Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error)
	// contains filtered or unexported methods
}

DiscoveryNetworkServiceServer is the server API for DiscoveryNetworkService service. All implementations must embed UnimplementedDiscoveryNetworkServiceServer for forward compatibility

type JoinRequest

type JoinRequest struct {
	Pool     string `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`         // required
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // optional
	Node     *Node  `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`         // required
	// contains filtered or unexported fields
}

func (*JoinRequest) Descriptor deprecated

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

Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.

func (*JoinRequest) GetNode

func (x *JoinRequest) GetNode() *Node

func (*JoinRequest) GetPassword

func (x *JoinRequest) GetPassword() string

func (*JoinRequest) GetPool

func (x *JoinRequest) GetPool() string

func (*JoinRequest) ProtoMessage

func (*JoinRequest) ProtoMessage()

func (*JoinRequest) ProtoReflect

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

func (*JoinRequest) Reset

func (x *JoinRequest) Reset()

func (*JoinRequest) String

func (x *JoinRequest) String() string

type JoinResponse

type JoinResponse struct {

	// The time after which the server will remove the node from the list
	// if the node doesn't make the Renew RPC call
	ResetInterval int64   `protobuf:"varint,1,opt,name=reset_interval,json=resetInterval,proto3" json:"reset_interval,omitempty"` // required
	Nodes         []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`                                       // optional
	// contains filtered or unexported fields
}

func (*JoinResponse) Descriptor deprecated

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

Deprecated: Use JoinResponse.ProtoReflect.Descriptor instead.

func (*JoinResponse) GetNodes

func (x *JoinResponse) GetNodes() []*Node

func (*JoinResponse) GetResetInterval

func (x *JoinResponse) GetResetInterval() int64

func (*JoinResponse) ProtoMessage

func (*JoinResponse) ProtoMessage()

func (*JoinResponse) ProtoReflect

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

func (*JoinResponse) Reset

func (x *JoinResponse) Reset()

func (*JoinResponse) String

func (x *JoinResponse) String() string

type Node

type Node struct {
	Ip         string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`                                   // required
	Port       string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`                               // required
	CommonName string `protobuf:"bytes,3,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"` // required
	Uuid       string `protobuf:"bytes,4,opt,name=uuid,proto3" json:"uuid,omitempty"`                               // required
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetCommonName

func (x *Node) GetCommonName() string

func (*Node) GetIp

func (x *Node) GetIp() string

func (*Node) GetPort

func (x *Node) GetPort() string

func (*Node) GetUuid

func (x *Node) GetUuid() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type UnimplementedDiscoveryNetworkServiceServer

type UnimplementedDiscoveryNetworkServiceServer struct {
}

UnimplementedDiscoveryNetworkServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryNetworkServiceServer) Disconnect

func (UnimplementedDiscoveryNetworkServiceServer) Join

type UnsafeDiscoveryNetworkServiceServer

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

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

Jump to

Keyboard shortcuts

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