Documentation ¶
Overview ¶
Package config is a generated protocol buffer package.
It is generated from these files:
config.proto
It has these top-level messages:
Server Group Layer Servers Groups Layers
Index ¶
- Variables
- func Assignments(groups map[string]*Group) [][]*Group
- func CloseConns(conns map[string]*grpc.ClientConn)
- func CreateGroupConfig(nGroups int, f float64, addrs []string) (map[string]*Server, map[string]*Group)
- func CreateGroupsWithAddresses(addrs [][]string) (map[string]*Server, map[string]*Group)
- func CreateOneGroupConfig(addrs []string) (map[string]*Server, map[string]*Group)
- func CreateRandomGroups(nGroups int, f float64, addrs []string) [][]string
- func CreateRandomGroupsWithSize(nGroups, size int, addrs []string) [][]string
- func DialServers(servers map[string]*Server) (map[string]*grpc.ClientConn, error)
- func FindCertificate(addr string, servers map[string]*Server) *tls.Certificate
- func FindIdentity(addr string, servers map[string]*Server) ([]byte, []byte)
- func GroupSize(nGroups int, f float64) int
- func GroupToKeys(servers map[string]*Server, group *Group) [][]byte
- func MarshalGroups(writer io.Writer, groups map[string]*Group) error
- func MarshalGroupsToFile(fn string, groups map[string]*Group) error
- func MarshalServers(writer io.Writer, servers map[string]*Server) error
- func MarshalServersToFile(fn string, servers map[string]*Server) error
- func Port(addr string) string
- func SelfSignedCertificate(name pkix.Name) ([]byte, *ecdsa.PrivateKey)
- func UnmarshalGroups(reader io.Reader) (map[string]*Group, error)
- func UnmarshalGroupsFromFile(fn string) (map[string]*Group, error)
- func UnmarshalServers(reader io.Reader) (map[string]*Server, error)
- func UnmarshalServersFromFile(fn string) (map[string]*Server, error)
- type Group
- func (*Group) Descriptor() ([]byte, []int)
- func (m *Group) GetGid() string
- func (m *Group) GetLayer() uint32
- func (m *Group) GetPredecessors() []string
- func (m *Group) GetRow() uint32
- func (m *Group) GetServers() []string
- func (m *Group) GetSuccessors() []string
- func (m *Group) Marshal() (dAtA []byte, err error)
- func (m *Group) MarshalTo(dAtA []byte) (int, error)
- func (*Group) ProtoMessage()
- func (m *Group) Reset()
- func (m *Group) Size() (n int)
- func (m *Group) String() string
- func (m *Group) Unmarshal(dAtA []byte) error
- type Groups
- func (*Groups) Descriptor() ([]byte, []int)
- func (m *Groups) GetGroups() map[string]*Group
- func (m *Groups) Marshal() (dAtA []byte, err error)
- func (m *Groups) MarshalTo(dAtA []byte) (int, error)
- func (*Groups) ProtoMessage()
- func (m *Groups) Reset()
- func (m *Groups) Size() (n int)
- func (m *Groups) String() string
- func (m *Groups) Unmarshal(dAtA []byte) error
- type Layer
- func (*Layer) Descriptor() ([]byte, []int)
- func (m *Layer) GetGroups() []string
- func (m *Layer) GetLayerId() uint32
- func (m *Layer) Marshal() (dAtA []byte, err error)
- func (m *Layer) MarshalTo(dAtA []byte) (int, error)
- func (*Layer) ProtoMessage()
- func (m *Layer) Reset()
- func (m *Layer) Size() (n int)
- func (m *Layer) String() string
- func (m *Layer) Unmarshal(dAtA []byte) error
- type Layers
- func (*Layers) Descriptor() ([]byte, []int)
- func (m *Layers) GetLayers() []*Layer
- func (m *Layers) Marshal() (dAtA []byte, err error)
- func (m *Layers) MarshalTo(dAtA []byte) (int, error)
- func (*Layers) ProtoMessage()
- func (m *Layers) Reset()
- func (m *Layers) Size() (n int)
- func (m *Layers) String() string
- func (m *Layers) Unmarshal(dAtA []byte) error
- type RandReader
- type Server
- func (*Server) Descriptor() ([]byte, []int)
- func (m *Server) GetAddress() string
- func (m *Server) GetExtensions() map[string][]byte
- func (m *Server) GetId() string
- func (m *Server) GetIdentity() []byte
- func (m *Server) GetPrivateIdentity() []byte
- func (m *Server) GetPrivateKey() []byte
- func (m *Server) GetPublicKey() []byte
- func (m *Server) Marshal() (dAtA []byte, err error)
- func (m *Server) MarshalTo(dAtA []byte) (int, error)
- func (*Server) ProtoMessage()
- func (m *Server) Reset()
- func (m *Server) Size() (n int)
- func (m *Server) String() string
- func (m *Server) Unmarshal(dAtA []byte) error
- type Servers
- func (*Servers) Descriptor() ([]byte, []int)
- func (m *Servers) GetServers() map[string]*Server
- func (m *Servers) Marshal() (dAtA []byte, err error)
- func (m *Servers) MarshalTo(dAtA []byte) (int, error)
- func (*Servers) ProtoMessage()
- func (m *Servers) Reset()
- func (m *Servers) Size() (n int)
- func (m *Servers) String() string
- func (m *Servers) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") )
View Source
var StreamSize = 2 * 1024 * 1024
Functions ¶
func Assignments ¶
func CloseConns ¶
func CloseConns(conns map[string]*grpc.ClientConn)
func CreateGroupConfig ¶
func CreateOneGroupConfig ¶
func CreateRandomGroups ¶
func DialServers ¶
func FindCertificate ¶
func FindCertificate(addr string, servers map[string]*Server) *tls.Certificate
func SelfSignedCertificate ¶
func SelfSignedCertificate(name pkix.Name) ([]byte, *ecdsa.PrivateKey)
Types ¶
type Group ¶
type Group struct { Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` Layer uint32 `protobuf:"fixed32,2,opt,name=layer,proto3" json:"layer,omitempty"` Row uint32 `protobuf:"fixed32,3,opt,name=row,proto3" json:"row,omitempty"` // server ids of this group Servers []string `protobuf:"bytes,4,rep,name=servers" json:"servers,omitempty"` // neighbors gids Predecessors []string `protobuf:"bytes,5,rep,name=predecessors" json:"predecessors,omitempty"` Successors []string `protobuf:"bytes,6,rep,name=successors" json:"successors,omitempty"` }
func (*Group) Descriptor ¶
func (*Group) GetPredecessors ¶
func (*Group) GetServers ¶
func (*Group) GetSuccessors ¶
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
type Groups ¶
func (*Groups) Descriptor ¶
func (*Groups) ProtoMessage ¶
func (*Groups) ProtoMessage()
type Layer ¶
type Layer struct { LayerId uint32 `protobuf:"fixed32,1,opt,name=layer_id,json=layerId,proto3" json:"layer_id,omitempty"` // group ids of this layer Groups []string `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` }
func (*Layer) Descriptor ¶
func (*Layer) GetLayerId ¶
func (*Layer) ProtoMessage ¶
func (*Layer) ProtoMessage()
type Layers ¶
type Layers struct {
Layers []*Layer `protobuf:"bytes,1,rep,name=layers" json:"layers,omitempty"`
}
func (*Layers) Descriptor ¶
func (*Layers) ProtoMessage ¶
func (*Layers) ProtoMessage()
type RandReader ¶
func NewRandReader ¶
func NewRandReader(seed []byte) *RandReader
func (*RandReader) SelectRandom ¶
func (r *RandReader) SelectRandom(n int, t int) []int
select t out of n, without replacement
func (*RandReader) UInt64 ¶
func (r *RandReader) UInt64() uint64
type Server ¶
type Server struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // typically a certificate, but could be a signing key, or whatever // else that could be used to authenticate itself Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` PrivateIdentity []byte `protobuf:"bytes,4,opt,name=private_identity,json=privateIdentity,proto3" json:"private_identity,omitempty"` // onion encryption key PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // extensions contain the blinding key Extensions map[string][]byte `` /* 154-byte string literal not displayed */ }
func CreateServer ¶
func (*Server) Descriptor ¶
func (*Server) GetAddress ¶
func (*Server) GetExtensions ¶
func (*Server) GetIdentity ¶
func (*Server) GetPrivateIdentity ¶
func (*Server) GetPrivateKey ¶
func (*Server) GetPublicKey ¶
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
type Servers ¶
func (*Servers) Descriptor ¶
func (*Servers) GetServers ¶
func (*Servers) ProtoMessage ¶
func (*Servers) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.