gossip

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPrimitiveServer

func RegisterPrimitiveServer(server *grpc.Server, client *Client, env env.DriverEnv)

Types

type Client

type Client struct {
	Cluster cluster.Cluster
	// contains filtered or unexported fields
}

Client is a client for communicating with the storage layer

func NewClient

func NewClient(cluster cluster.Cluster, scheme time.Scheme) *Client

NewClient creates a new proxy client

func (*Client) AddResponseHeaders

func (c *Client) AddResponseHeaders(headers *primitive.ResponseHeaders)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Partition

func (c *Client) Partition(partitionID PartitionID) *Partition

func (*Client) PartitionBy

func (c *Client) PartitionBy(partitionKey []byte) *Partition

func (*Client) Partitions

func (c *Client) Partitions() []*Partition

type Partition

type Partition struct {
	cluster.Partition

	ID PartitionID
	// contains filtered or unexported fields
}

Partition is a proxy partition

func NewPartition

func NewPartition(c cluster.Cluster, p cluster.Partition, clock time.Clock) *Partition

NewPartition creates a new proxy partition

func (*Partition) AddRequestHeaders

func (p *Partition) AddRequestHeaders(ctx context.Context, headers *primitive.RequestHeaders) context.Context

func (*Partition) AddResponseHeaders

func (p *Partition) AddResponseHeaders(headers *primitive.ResponseHeaders)

func (*Partition) Close

func (p *Partition) Close() error

close closes the connections

func (*Partition) Connect

func (p *Partition) Connect() (*grpc.ClientConn, error)

Connect gets the connection to the partition

type PartitionID

type PartitionID int

PartitionID is a partition identifier

type PrimitiveServer

type PrimitiveServer struct {
	*Client
	// contains filtered or unexported fields
}

func (*PrimitiveServer) Close

func (*PrimitiveServer) Create

func (*PrimitiveServer) Delete

type Protocol

type Protocol struct {
	*server.Server
	Client *Client
	Env    env.DriverEnv
	// contains filtered or unexported fields
}

Protocol is a state machine protocol

func NewProtocol

func NewProtocol(cluster cluster.Cluster, env env.DriverEnv, scheme time.Scheme) *Protocol

NewProtocol creates a new state machine protocol

func (*Protocol) Configure

func (n *Protocol) Configure(config protocolapi.ProtocolConfig) error

Configure configures the protocol

func (*Protocol) Name

func (n *Protocol) Name() string

Name returns the protocol name

func (*Protocol) Primitives

func (n *Protocol) Primitives() *primitive.PrimitiveTypeRegistry

Primitives returns the protocol primitives

func (*Protocol) Start

func (n *Protocol) Start() error

Start starts the node

func (*Protocol) Stop

func (n *Protocol) Stop() error

Stop stops the node

Directories

Path Synopsis
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.

Jump to

Keyboard shortcuts

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