config

package
v0.0.0-...-89ef835 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: ISC Imports: 5 Imported by: 6

Documentation

Overview

Package config represents the global configuration options for a Prio deployment.

Index

Constants

View Source
const (
	TypeInt      FieldType = iota
	TypeIntPow             = iota
	TypeBoolOr             = iota
	TypeBoolAnd            = iota
	TypeCountMin           = iota
	TypeLinReg             = iota

	// Used only for performance comparison. There is
	// no need to use these types in practice.
	TypeIntUnsafe = iota
)

Data types that Prio supports.

View Source
const DEFAULT_MAX_PENDING_REQS = 64

Each server buffers a certain number of client submissions. This value defines how large that buffer is by default.

View Source
const MAX_BUCKETS = 1024 * 128

Maximum sizes for count-min sketch structure.

View Source
const MAX_HASHES = 256

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAddress

type ClientAddress string

type Config

type Config struct {
	MaxPendingReqs int
	Circuit        *circuit.Circuit
	Fields         []Field
	Servers        []ServerAddress
	Clients        []ClientAddress
}
var Default *Config

The default configuration.

func Load

func Load(s []byte) (*Config, error)

Load a configuration file from a byte array.

func LoadFile

func LoadFile(filename string) *Config

func (*Config) NumServers

func (cfg *Config) NumServers() int

type Field

type Field struct {
	Name string
	Type FieldType

	IntBits int
	IntPow  int

	CountMinHashes  int
	CountMinBuckets int

	// Each client training example has the form:
	//    (y, x_1, x_2, ..., x_n)
	// where the data has dimension n.
	//
	// The 0th entry is the number of bits in the y value.
	// The rest of the entries represent the number of bits in each x_i.
	LinRegBits []int
}

Definition of a data type that this Prio deployment collects.

type FieldType

type FieldType byte

func (*FieldType) UnmarshalJSON

func (ft *FieldType) UnmarshalJSON(data []byte) error

See: https://talks.golang.org/2015/json.slide#23

type ServerAddress

type ServerAddress struct {
	Public  string `json:"addrPub"`
	Private string `json:"addrPriv"`
}

Jump to

Keyboard shortcuts

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