proto

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Discovery_FindPeers_FullMethodName = "/v1.Discovery/FindPeers"
)
View Source
const (
	Identity_Hello_FullMethodName = "/v1.Identity/Hello"
)

Variables

View Source
var Discovery_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Discovery",
	HandlerType: (*DiscoveryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "FindPeers",
			Handler:    _Discovery_FindPeers_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "core/network/proto/discovery.proto",
}

Discovery_ServiceDesc is the grpc.ServiceDesc for Discovery 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_core_network_proto_discovery_proto protoreflect.FileDescriptor
View Source
var File_core_network_proto_identity_proto protoreflect.FileDescriptor
View Source
var Identity_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Identity",
	HandlerType: (*IdentityServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Hello",
			Handler:    _Identity_Hello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "core/network/proto/identity.proto",
}

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

Functions

func RegisterDiscoveryServer

func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer)

func RegisterIdentityServer

func RegisterIdentityServer(s grpc.ServiceRegistrar, srv IdentityServer)

Types

type DiscoveryClient

type DiscoveryClient interface {
	FindPeers(ctx context.Context, in *FindPeersReq, opts ...grpc.CallOption) (*FindPeersResp, error)
}

DiscoveryClient is the client API for Discovery 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 NewDiscoveryClient

func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient

type DiscoveryServer

type DiscoveryServer interface {
	FindPeers(context.Context, *FindPeersReq) (*FindPeersResp, error)
	// contains filtered or unexported methods
}

DiscoveryServer is the server API for Discovery service. All implementations must embed UnimplementedDiscoveryServer for forward compatibility

type FindPeersReq

type FindPeersReq struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Count int64  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*FindPeersReq) Descriptor deprecated

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

Deprecated: Use FindPeersReq.ProtoReflect.Descriptor instead.

func (*FindPeersReq) GetCount

func (x *FindPeersReq) GetCount() int64

func (*FindPeersReq) GetKey

func (x *FindPeersReq) GetKey() string

func (*FindPeersReq) ProtoMessage

func (*FindPeersReq) ProtoMessage()

func (*FindPeersReq) ProtoReflect

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

func (*FindPeersReq) Reset

func (x *FindPeersReq) Reset()

func (*FindPeersReq) String

func (x *FindPeersReq) String() string

type FindPeersResp

type FindPeersResp struct {
	Nodes []string `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*FindPeersResp) Descriptor deprecated

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

Deprecated: Use FindPeersResp.ProtoReflect.Descriptor instead.

func (*FindPeersResp) GetNodes

func (x *FindPeersResp) GetNodes() []string

func (*FindPeersResp) ProtoMessage

func (*FindPeersResp) ProtoMessage()

func (*FindPeersResp) ProtoReflect

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

func (*FindPeersResp) Reset

func (x *FindPeersResp) Reset()

func (*FindPeersResp) String

func (x *FindPeersResp) String() string

type IdentityClient

type IdentityClient interface {
	Hello(ctx context.Context, in *Status, opts ...grpc.CallOption) (*Status, error)
}

IdentityClient is the client API for Identity 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 NewIdentityClient

func NewIdentityClient(cc grpc.ClientConnInterface) IdentityClient

type IdentityServer

type IdentityServer interface {
	Hello(context.Context, *Status) (*Status, error)
	// contains filtered or unexported methods
}

IdentityServer is the server API for Identity service. All implementations must embed UnimplementedIdentityServer for forward compatibility

type PeerInfo

type PeerInfo struct {
	From  string   `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerInfo) Descriptor deprecated

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

Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead.

func (*PeerInfo) GetFrom

func (x *PeerInfo) GetFrom() string

func (*PeerInfo) GetNodes

func (x *PeerInfo) GetNodes() []string

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) ProtoReflect

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

func (*PeerInfo) Reset

func (x *PeerInfo) Reset()

func (*PeerInfo) String

func (x *PeerInfo) String() string

type Status

type Status struct {
	Metadata      map[string]string `` /* 157-byte string literal not displayed */
	Keys          []*Status_Key     `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	Network       int64             `protobuf:"varint,3,opt,name=network,proto3" json:"network,omitempty"`
	Genesis       string            `protobuf:"bytes,4,opt,name=genesis,proto3" json:"genesis,omitempty"`
	TemporaryDial bool              `protobuf:"varint,5,opt,name=temporaryDial,proto3" json:"temporaryDial,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetGenesis

func (x *Status) GetGenesis() string

func (*Status) GetKeys

func (x *Status) GetKeys() []*Status_Key

func (*Status) GetMetadata

func (x *Status) GetMetadata() map[string]string

func (*Status) GetNetwork

func (x *Status) GetNetwork() int64

func (*Status) GetTemporaryDial

func (x *Status) GetTemporaryDial() bool

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type Status_Key

type Status_Key struct {
	Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	Message   string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Status_Key) Descriptor deprecated

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

Deprecated: Use Status_Key.ProtoReflect.Descriptor instead.

func (*Status_Key) GetMessage

func (x *Status_Key) GetMessage() string

func (*Status_Key) GetSignature

func (x *Status_Key) GetSignature() string

func (*Status_Key) ProtoMessage

func (*Status_Key) ProtoMessage()

func (*Status_Key) ProtoReflect

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

func (*Status_Key) Reset

func (x *Status_Key) Reset()

func (*Status_Key) String

func (x *Status_Key) String() string

type UnimplementedDiscoveryServer

type UnimplementedDiscoveryServer struct {
}

UnimplementedDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryServer) FindPeers

type UnimplementedIdentityServer

type UnimplementedIdentityServer struct {
}

UnimplementedIdentityServer must be embedded to have forward compatible implementations.

func (UnimplementedIdentityServer) Hello

type UnsafeDiscoveryServer

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

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

type UnsafeIdentityServer

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

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

Jump to

Keyboard shortcuts

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