Documentation
¶
Overview ¶
test package offers some common functionalities that are used throughout many different tests in drand.
Index ¶
- func Addresses(n int) []string
- func BatchIdentities(n int) ([]*key.Private, *key.Group)
- func FreePort() int
- func GenerateIDs(n int) []*key.Private
- func ListFromPrivates(keys []*key.Private) []*key.Identity
- func NewKeyStore() key.Store
- type KeyStore
- func (k *KeyStore) LoadDistPublic() (*key.DistPublic, error)
- func (k *KeyStore) LoadGroup() (*key.Group, error)
- func (k *KeyStore) LoadPrivate() (*key.Private, error)
- func (k *KeyStore) LoadShare() (*key.Share, error)
- func (k *KeyStore) SaveDistPublic(d *key.DistPublic) error
- func (k *KeyStore) SaveGroup(g *key.Group) error
- func (k *KeyStore) SavePrivate(p *key.Private) error
- func (k *KeyStore) SaveShare(share *key.Share) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Addresses ¶
Addresses returns a list of TCP localhost addresses starting from the given port= start.
func FreePort ¶
func FreePort() int
GetFreePort returns an free TCP port. Taken from https://github.com/phayes/freeport/blob/master/freeport.go
func GenerateIDs ¶
GenerateIDs returns n keys with random port localhost addresses
func ListFromPrivates ¶
ListFromPrivates returns a list of Identity from a list of Private keys.
func NewKeyStore ¶
Types ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
func (*KeyStore) LoadDistPublic ¶
func (k *KeyStore) LoadDistPublic() (*key.DistPublic, error)
func (*KeyStore) SaveDistPublic ¶
func (k *KeyStore) SaveDistPublic(d *key.DistPublic) error
Click to show internal directories.
Click to hide internal directories.