Version: v0.0.0-...-fc1e718 Latest Latest

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

Go to latest
Published: May 10, 2017 License: MIT Imports: 5 Imported by: 9




This section is empty.


This section is empty.


func CheckConfig

func CheckConfig(config Config) error

CheckConfig checks wheather a given configuration is sensible

func CheckServerConfig

func CheckServerConfig(config ServerConfig) error

CheckServerConfig checks wheather a given configuration is sensible

func CheckWorkloadConfig

func CheckWorkloadConfig(config ConfigAuto) error

CheckWorkloadConfig verifies that a workload is sensible


type Addresses

type Addresses struct {
	Peers   []NetAddress
	Clients []NetAddress

Addresses describes the network configuarion of an Ios cluster.

func ParseAddresses

func ParseAddresses(filename string) (Addresses, error)

ParseAddresses filename will parse the given file into an Addresses struct

type Config

type Config struct {
	Parameters struct {
		Timeout       int
		Backoff       int
		ConnectRandom bool
		BeforeForce   int
		Application   string

func ParseClientConfig

func ParseClientConfig(filename string) (Config, error)

ParseConfig reads a client configuration from a file and returns a config struct Callers usually then pass result to CheckConfig

type ConfigAuto

type ConfigAuto struct {
	Reads     int // percentage of read requests, the remaining requests are writes.
	Interval  int // milliseconand delay between recieving a response and sending next request
	KeySize   int // size of key for generated requests, unit is string characters
	ValueSize int // size of value for generated requests, unit is string characters
	Requests  int // terminate after this number of requests have been completed
	Keys      int // number of keys to operate on

ConfigAuto describes a client workload to be generated.

func ParseWorkloadConfig

func ParseWorkloadConfig(filename string) (ConfigAuto, error)

ParseWorkloadConfig filenames parses the given workload configation file. Callers usually then pass result to CheckWorkloadConfig

type NetAddress

type NetAddress struct {
	Address string
	Port    int

NetAddress holds a network address

func (NetAddress) ToString

func (n NetAddress) ToString() string

type ServerConfig

type ServerConfig struct {
	Algorithm struct {
		DelegateReplication  int    // how many replication coordinators to delegate to when master, -1 means use reverse delegation
		QuorumSystem         string // which quorum system to use: either "strict majority", "non-strict majority", "all-in", "one-in" or "fixed:n"
		IndexExclusivity     bool   // if enabled, Ios will assign each index to at most one request
		ParticipantHandle    bool   // if enabled, non-master servers will handle/forward client requests, otherwise they will redirect clients
		ParticipantRead      bool   // if set then non-master servers can service reads after getting backing from a read quorum. "forward mode only"
		ImplicitWindowCommit bool   // if uncommitted request is outside of current window then commit
		ExplicitCommit       bool   // if enabled, Ios coordinators will send commit messages to all after replication
		ThriftyQuorum        bool   // if enabled, coordinators will send writes to quorum only instead of broadcasting
	Performance struct {
		Length           int // max log size
		BatchInterval    int // how often to batch process request in ms, 0 means no batching
		MaxBatch         int // maximum requests in a batch, unused if BatchInterval=0
		WindowSize       int // how many requests can the master have inflight at once
		SnapshotInterval int // how often to record state machine snapshots, 0 means snapshotting is disabled
	Application struct {
		Name string // which application should Ios serve: either "kv-store" or "dummy"
	Unsafe struct {
		DumpPersistentStorage bool   // if enabled, then persistent storage is not written to a file, always set to false
		PersistenceMode       string // mode of write ahead logging: either "none", "fsync" or "osync", "direct" or "dsync". The "none" option is unsafe.

ServerConfig describes the configuration options for an Ios server. Example valid configuration files can be found in server/example.conf and server/example3.conf

func ParseServerConfig

func ParseServerConfig(filename string) (ServerConfig, error)

ParseServerConfig filename will parse the given file and return a ServerConfig struct containing its data Callers usually then pass result to CheckServerConfig

Jump to

Keyboard shortcuts

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