lightpeer

package
v0.1.0-k8s Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Lightblock_BlockType_name = map[int32]string{
	0: "NETWORK",
	1: "CLIENT",
}
View Source
var Lightblock_BlockType_value = map[string]int32{
	"NETWORK": 0,
	"CLIENT":  1,
}

Functions

func RegisterLightpeerServer

func RegisterLightpeerServer(s *grpc.Server, srv LightpeerServer)

Types

type ConnectRequest

type ConnectRequest struct {
	Peer                 *PeerInfo `protobuf:"bytes,1,opt,name=Peer,proto3" json:"Peer,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ConnectRequest) Descriptor

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

func (*ConnectRequest) GetPeer

func (m *ConnectRequest) GetPeer() *PeerInfo

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) Reset

func (m *ConnectRequest) Reset()

func (*ConnectRequest) String

func (m *ConnectRequest) String() string

func (*ConnectRequest) XXX_DiscardUnknown

func (m *ConnectRequest) XXX_DiscardUnknown()

func (*ConnectRequest) XXX_Marshal

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

func (*ConnectRequest) XXX_Merge

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

func (*ConnectRequest) XXX_Size

func (m *ConnectRequest) XXX_Size() int

func (*ConnectRequest) XXX_Unmarshal

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

type EmptyQueryRequest

type EmptyQueryRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmptyQueryRequest) Descriptor

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

func (*EmptyQueryRequest) ProtoMessage

func (*EmptyQueryRequest) ProtoMessage()

func (*EmptyQueryRequest) Reset

func (m *EmptyQueryRequest) Reset()

func (*EmptyQueryRequest) String

func (m *EmptyQueryRequest) String() string

func (*EmptyQueryRequest) XXX_DiscardUnknown

func (m *EmptyQueryRequest) XXX_DiscardUnknown()

func (*EmptyQueryRequest) XXX_Marshal

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

func (*EmptyQueryRequest) XXX_Merge

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

func (*EmptyQueryRequest) XXX_Size

func (m *EmptyQueryRequest) XXX_Size() int

func (*EmptyQueryRequest) XXX_Unmarshal

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

type JoinRequest

type JoinRequest struct {
	Address              string   `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JoinRequest) Descriptor

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

func (*JoinRequest) GetAddress

func (m *JoinRequest) GetAddress() string

func (*JoinRequest) ProtoMessage

func (*JoinRequest) ProtoMessage()

func (*JoinRequest) Reset

func (m *JoinRequest) Reset()

func (*JoinRequest) String

func (m *JoinRequest) String() string

func (*JoinRequest) XXX_DiscardUnknown

func (m *JoinRequest) XXX_DiscardUnknown()

func (*JoinRequest) XXX_Marshal

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

func (*JoinRequest) XXX_Merge

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

func (*JoinRequest) XXX_Size

func (m *JoinRequest) XXX_Size() int

func (*JoinRequest) XXX_Unmarshal

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

type JoinResponse

type JoinResponse struct {
	Result               string   `protobuf:"bytes,1,opt,name=Result,proto3" json:"Result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JoinResponse) Descriptor

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

func (*JoinResponse) GetResult

func (m *JoinResponse) GetResult() string

func (*JoinResponse) ProtoMessage

func (*JoinResponse) ProtoMessage()

func (*JoinResponse) Reset

func (m *JoinResponse) Reset()

func (*JoinResponse) String

func (m *JoinResponse) String() string

func (*JoinResponse) XXX_DiscardUnknown

func (m *JoinResponse) XXX_DiscardUnknown()

func (*JoinResponse) XXX_Marshal

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

func (*JoinResponse) XXX_Merge

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

func (*JoinResponse) XXX_Size

func (m *JoinResponse) XXX_Size() int

func (*JoinResponse) XXX_Unmarshal

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

type Lightblock

type Lightblock struct {
	ID                   string               `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Payload              []byte               `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"`
	PrevID               string               `protobuf:"bytes,3,opt,name=PrevID,proto3" json:"PrevID,omitempty"`
	Type                 Lightblock_BlockType `protobuf:"varint,9,opt,name=Type,proto3,enum=Lightblock_BlockType" json:"Type,omitempty"`
	LastUpdated          *timestamp.Timestamp `protobuf:"bytes,10,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Lightblock) Descriptor

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

func (*Lightblock) GetID

func (m *Lightblock) GetID() string

func (*Lightblock) GetLastUpdated

func (m *Lightblock) GetLastUpdated() *timestamp.Timestamp

func (*Lightblock) GetPayload

func (m *Lightblock) GetPayload() []byte

func (*Lightblock) GetPrevID

func (m *Lightblock) GetPrevID() string

func (*Lightblock) GetType

func (m *Lightblock) GetType() Lightblock_BlockType

func (*Lightblock) ProtoMessage

func (*Lightblock) ProtoMessage()

func (*Lightblock) Reset

func (m *Lightblock) Reset()

func (*Lightblock) String

func (m *Lightblock) String() string

func (*Lightblock) XXX_DiscardUnknown

func (m *Lightblock) XXX_DiscardUnknown()

func (*Lightblock) XXX_Marshal

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

func (*Lightblock) XXX_Merge

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

func (*Lightblock) XXX_Size

func (m *Lightblock) XXX_Size() int

func (*Lightblock) XXX_Unmarshal

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

type Lightblock_BlockType

type Lightblock_BlockType int32
const (
	Lightblock_NETWORK Lightblock_BlockType = 0
	Lightblock_CLIENT  Lightblock_BlockType = 1
)

func (Lightblock_BlockType) EnumDescriptor

func (Lightblock_BlockType) EnumDescriptor() ([]byte, []int)

func (Lightblock_BlockType) String

func (x Lightblock_BlockType) String() string

type LightpeerClient

type LightpeerClient interface {
	JoinNetwork(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error)
	ConnectNewPeer(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (Lightpeer_ConnectNewPeerClient, error)
	Persist(ctx context.Context, in *PersistRequest, opts ...grpc.CallOption) (*PersistResponse, error)
	Query(ctx context.Context, in *EmptyQueryRequest, opts ...grpc.CallOption) (Lightpeer_QueryClient, error)
	NotifyNewBlock(ctx context.Context, in *Lightblock, opts ...grpc.CallOption) (*NewBlockResponse, error)
}

LightpeerClient is the client API for Lightpeer service.

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

func NewLightpeerClient

func NewLightpeerClient(cc grpc.ClientConnInterface) LightpeerClient

type LightpeerServer

LightpeerServer is the server API for Lightpeer service.

type Lightpeer_ConnectNewPeerClient

type Lightpeer_ConnectNewPeerClient interface {
	Recv() (*Lightblock, error)
	grpc.ClientStream
}

type Lightpeer_ConnectNewPeerServer

type Lightpeer_ConnectNewPeerServer interface {
	Send(*Lightblock) error
	grpc.ServerStream
}

type Lightpeer_QueryClient

type Lightpeer_QueryClient interface {
	Recv() (*QueryResponse, error)
	grpc.ClientStream
}

type Lightpeer_QueryServer

type Lightpeer_QueryServer interface {
	Send(*QueryResponse) error
	grpc.ServerStream
}

type NewBlockResponse

type NewBlockResponse struct {
	Response             string   `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NewBlockResponse) Descriptor

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

func (*NewBlockResponse) GetResponse

func (m *NewBlockResponse) GetResponse() string

func (*NewBlockResponse) ProtoMessage

func (*NewBlockResponse) ProtoMessage()

func (*NewBlockResponse) Reset

func (m *NewBlockResponse) Reset()

func (*NewBlockResponse) String

func (m *NewBlockResponse) String() string

func (*NewBlockResponse) XXX_DiscardUnknown

func (m *NewBlockResponse) XXX_DiscardUnknown()

func (*NewBlockResponse) XXX_Marshal

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

func (*NewBlockResponse) XXX_Merge

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

func (*NewBlockResponse) XXX_Size

func (m *NewBlockResponse) XXX_Size() int

func (*NewBlockResponse) XXX_Unmarshal

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

type PeerInfo

type PeerInfo struct {
	Address              string   `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerInfo) Descriptor

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

func (*PeerInfo) GetAddress

func (m *PeerInfo) GetAddress() string

func (*PeerInfo) GetName

func (m *PeerInfo) GetName() string

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) Reset

func (m *PeerInfo) Reset()

func (*PeerInfo) String

func (m *PeerInfo) String() string

func (*PeerInfo) XXX_DiscardUnknown

func (m *PeerInfo) XXX_DiscardUnknown()

func (*PeerInfo) XXX_Marshal

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

func (*PeerInfo) XXX_Merge

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

func (*PeerInfo) XXX_Size

func (m *PeerInfo) XXX_Size() int

func (*PeerInfo) XXX_Unmarshal

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

type PersistRequest

type PersistRequest struct {
	Payload              []byte   `protobuf:"bytes,1,opt,name=Payload,proto3" json:"Payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PersistRequest) Descriptor

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

func (*PersistRequest) GetPayload

func (m *PersistRequest) GetPayload() []byte

func (*PersistRequest) ProtoMessage

func (*PersistRequest) ProtoMessage()

func (*PersistRequest) Reset

func (m *PersistRequest) Reset()

func (*PersistRequest) String

func (m *PersistRequest) String() string

func (*PersistRequest) XXX_DiscardUnknown

func (m *PersistRequest) XXX_DiscardUnknown()

func (*PersistRequest) XXX_Marshal

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

func (*PersistRequest) XXX_Merge

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

func (*PersistRequest) XXX_Size

func (m *PersistRequest) XXX_Size() int

func (*PersistRequest) XXX_Unmarshal

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

type PersistResponse

type PersistResponse struct {
	Response             string   `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PersistResponse) Descriptor

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

func (*PersistResponse) GetResponse

func (m *PersistResponse) GetResponse() string

func (*PersistResponse) ProtoMessage

func (*PersistResponse) ProtoMessage()

func (*PersistResponse) Reset

func (m *PersistResponse) Reset()

func (*PersistResponse) String

func (m *PersistResponse) String() string

func (*PersistResponse) XXX_DiscardUnknown

func (m *PersistResponse) XXX_DiscardUnknown()

func (*PersistResponse) XXX_Marshal

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

func (*PersistResponse) XXX_Merge

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

func (*PersistResponse) XXX_Size

func (m *PersistResponse) XXX_Size() int

func (*PersistResponse) XXX_Unmarshal

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

type QueryResponse

type QueryResponse struct {
	Payload              []byte   `protobuf:"bytes,1,opt,name=Payload,proto3" json:"Payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryResponse) Descriptor

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

func (*QueryResponse) GetPayload

func (m *QueryResponse) GetPayload() []byte

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset

func (m *QueryResponse) Reset()

func (*QueryResponse) String

func (m *QueryResponse) String() string

func (*QueryResponse) XXX_DiscardUnknown

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal

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

func (*QueryResponse) XXX_Merge

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

func (*QueryResponse) XXX_Size

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal

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

type UnimplementedLightpeerServer

type UnimplementedLightpeerServer struct {
}

UnimplementedLightpeerServer can be embedded to have forward compatible implementations.

func (*UnimplementedLightpeerServer) ConnectNewPeer

func (*UnimplementedLightpeerServer) JoinNetwork

func (*UnimplementedLightpeerServer) NotifyNewBlock

func (*UnimplementedLightpeerServer) Persist

func (*UnimplementedLightpeerServer) Query

Jump to

Keyboard shortcuts

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