mesh

package
v0.0.0-...-e7c9706 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 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
}

func (*Client) Locality

func (c *Client) Locality() locality.Instance

func (*Client) Mesh

func (c *Client) Mesh() *Instance

func (*Client) SendRequests

func (c *Client) SendRequests(conn network.Connection, numRequests int, done func())

type ClientSettings

type ClientSettings struct {
	RPS      int
	Locality locality.Instance
}

type Instance

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

func New

func New(s Settings) *Instance

func (*Instance) Clients

func (m *Instance) Clients() []*Client

func (*Instance) NewClient

func (m *Instance) NewClient(s ClientSettings) *Client

func (*Instance) NewConnection

func (m *Instance) NewConnection(src *Client, dest *Node) network.Connection

func (*Instance) NewNodes

func (m *Instance) NewNodes(count int, serviceTime time.Duration, enableQueueLatency bool, locality locality.Instance) Nodes

func (*Instance) Nodes

func (m *Instance) Nodes() Nodes

func (*Instance) ShutDown

func (m *Instance) ShutDown()

type Node

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

func (*Node) ActiveRequests

func (n *Node) ActiveRequests() uint64

func (*Node) Latency

func (n *Node) Latency() *timeseries.Instance

func (*Node) Locality

func (n *Node) Locality() locality.Instance

func (*Node) Name

func (n *Node) Name() string

func (*Node) QueueLatency

func (n *Node) QueueLatency() *timeseries.Instance

func (*Node) QueueLength

func (n *Node) QueueLength() *timeseries.Instance

func (*Node) Request

func (n *Node) Request(onDone func())

func (*Node) ShutDown

func (n *Node) ShutDown()

func (*Node) TotalRequests

func (n *Node) TotalRequests() uint64

type Nodes

type Nodes []*Node

func (Nodes) Latency

func (nodes Nodes) Latency() *timeseries.Instance

func (Nodes) QueueLatency

func (nodes Nodes) QueueLatency() *timeseries.Instance

func (Nodes) Select

func (nodes Nodes) Select(match locality.Match) Nodes

func (Nodes) ShutDown

func (nodes Nodes) ShutDown()

func (Nodes) TotalRequests

func (nodes Nodes) TotalRequests() uint64

type RouteKey

type RouteKey struct {
	Src  locality.Instance
	Dest locality.Instance
}

type Settings

type Settings struct {
	NetworkLatencies map[RouteKey]time.Duration
}

Jump to

Keyboard shortcuts

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