replication

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPeerId

func NewPeerId() (string, error)

func NewWorker

func NewWorker(self *Self, peers *Peers, init chan<- struct{})

Types

type Client

type Client struct {
	Self  *Self
	Peers *Peers
}

func (Client) SetSession

func (c Client) SetSession(sess session.Stamped)

type Peers

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

func NewPeers

func NewPeers() *Peers

type Self

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

func NewSelf

func NewSelf(id string, sessStore session.Store) *Self

type Server

type Server struct {
	api.UnimplementedReplicationServer
	Self  *Self
	Peers *Peers
}

func (Server) Handshake

func (s Server) Handshake(ctx context.Context, req *api.HandshakeRequest) (*api.HandshakeResponse, error)

func (Server) SetSession

func (s Server) SetSession(ctx context.Context, req *api.SetSessionRequest) (*api.SetSessionResponse, error)

func (Server) StreamSessions

Jump to

Keyboard shortcuts

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