client

package
v0.0.0-...-62b1f88 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a single client of the VSR cluster.

func New

func New(cfg Config) (*Client, error)

New creates a new client.

func (*Client) CheckResult

func (c *Client) CheckResult() (events.Reply, bool)

func (*Client) Request

func (c *Client) Request(op string) bool

func (*Client) Run

func (c *Client) Run()

func (*Client) Submit

func (c *Client) Submit(ev events.NetworkEvent)

type Config

type Config struct {
	ID             uint64
	Members        []string
	Network        network.Network
	Time           time.Time
	RequestTimeout uint64
	Logger         *slog.Logger
}

type Internal

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

type VSRState

type VSRState struct {
	// ID is the unique ID of the VSR client.
	ID uint64

	// RequestNumber is the monotonically increasing request
	// number of the client.
	RequestNumber uint64

	// LastKnownClusterMembers is the list of the last known
	// cluster members. This may not be the current cluster members.
	LastKnownClusterMembers []ipv4port.IPv4Port

	// LastKnownViewNumber is the last known view number of the cluster.
	LastKnownViewNumber uint64
}

Jump to

Keyboard shortcuts

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