configs

package
v0.0.0-...-2e7796a Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 3 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 {
	MailboxAddr string
}

type FD

type FD struct {
	PullInterval time.Duration
	Timeout      time.Duration
}

type LeaderElection

type LeaderElection struct {
	Timeout       time.Duration
	TimeoutOffset time.Duration
}

type Mailboxes

type Mailboxes struct {
	ReceiveChanSize int
	DialTimeout     time.Duration
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
}

type Root

type Root struct {
	NumServers int
	NumClients int

	Debug bool

	ClientRequestTimeout time.Duration

	FD             FD
	Mailboxes      Mailboxes
	LeaderElection LeaderElection

	AppendEntriesSendInterval time.Duration
	SharedResourceTimeout     time.Duration
	InputChanReadTimeout      time.Duration

	Servers map[int]Server
	Clients map[int]Client
}

func ReadConfig

func ReadConfig(path string) (Root, error)

func (Root) Validate

func (r Root) Validate() error

type Server

type Server struct {
	RaftAddr    string
	KVAddr      string
	MonitorAddr string
}

Jump to

Keyboard shortcuts

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