cap

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

README

go-cap

The CAP-Labs distributed networks architecture implement by golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterApplicationServer

func RegisterApplicationServer(s *grpc.Server, srv ApplicationServer)

func RegisterNetworkStreamServer

func RegisterNetworkStreamServer(s *grpc.Server, srv NetworkStreamServer)

func RegisterStoreServer

func RegisterStoreServer(s *grpc.Server, srv StoreServer)

Types

type ApplicationClient

type ApplicationClient interface {
}

ApplicationClient is the client API for Application service.

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

func NewApplicationClient

func NewApplicationClient(cc *grpc.ClientConn) ApplicationClient

type ApplicationServer

type ApplicationServer interface {
}

ApplicationServer is the server API for Application service.

type Cluster

type Cluster struct {
	Peers                []*Peer  `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Cluster the peers collection

func (*Cluster) Descriptor

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

func (*Cluster) GetPeers

func (m *Cluster) GetPeers() []*Peer

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) Reset

func (m *Cluster) Reset()

func (*Cluster) String

func (m *Cluster) String() string

func (*Cluster) XXX_DiscardUnknown

func (m *Cluster) XXX_DiscardUnknown()

func (*Cluster) XXX_Marshal

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

func (*Cluster) XXX_Merge

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

func (*Cluster) XXX_Size

func (m *Cluster) XXX_Size() int

func (*Cluster) XXX_Unmarshal

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

type NetworkStreamClient

type NetworkStreamClient interface {
	Handle(ctx context.Context, opts ...grpc.CallOption) (NetworkStream_HandleClient, error)
}

NetworkStreamClient is the client API for NetworkStream service.

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

func NewNetworkStreamClient

func NewNetworkStreamClient(cc *grpc.ClientConn) NetworkStreamClient

type NetworkStreamServer

type NetworkStreamServer interface {
	Handle(NetworkStream_HandleServer) error
}

NetworkStreamServer is the server API for NetworkStream service.

type NetworkStream_HandleClient

type NetworkStream_HandleClient interface {
	Send(*StreamPacket) error
	Recv() (*StreamPacket, error)
	grpc.ClientStream
}

type NetworkStream_HandleServer

type NetworkStream_HandleServer interface {
	Send(*StreamPacket) error
	Recv() (*StreamPacket, error)
	grpc.ServerStream
}

type Peer

type Peer struct {
	Id                   string   `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Addresses            []string `protobuf:"bytes,2,rep,name=Addresses,proto3" json:"Addresses,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Peer) Descriptor

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

func (*Peer) GetAddresses

func (m *Peer) GetAddresses() []string

func (*Peer) GetId

func (m *Peer) GetId() string

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) String

func (m *Peer) String() string

func (*Peer) XXX_DiscardUnknown

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal

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

func (*Peer) XXX_Merge

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

func (*Peer) XXX_Size

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal

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

type StoreClient

type StoreClient interface {
}

StoreClient is the client API for Store service.

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

func NewStoreClient

func NewStoreClient(cc *grpc.ClientConn) StoreClient

type StoreServer

type StoreServer interface {
}

StoreServer is the server API for Store service.

type StreamPacket

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

func (*StreamPacket) Descriptor

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

func (*StreamPacket) GetContent

func (m *StreamPacket) GetContent() []byte

func (*StreamPacket) GetPeerId

func (m *StreamPacket) GetPeerId() string

func (*StreamPacket) ProtoMessage

func (*StreamPacket) ProtoMessage()

func (*StreamPacket) Reset

func (m *StreamPacket) Reset()

func (*StreamPacket) String

func (m *StreamPacket) String() string

func (*StreamPacket) XXX_DiscardUnknown

func (m *StreamPacket) XXX_DiscardUnknown()

func (*StreamPacket) XXX_Marshal

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

func (*StreamPacket) XXX_Merge

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

func (*StreamPacket) XXX_Size

func (m *StreamPacket) XXX_Size() int

func (*StreamPacket) XXX_Unmarshal

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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