control

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package control is a generated protocol buffer package.

It is generated from these files:

control/control.proto

It has these top-level messages:

DKGRequest
DKGResponse
ReshareRequest
GroupInfo
ReshareResponse
ShareRequest
ShareResponse
Ping
Pong
PublicKeyRequest
PublicKeyResponse
PrivateKeyRequest
PrivateKeyResponse
CokeyRequest
CokeyResponse
GroupRequest
GroupResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterControlServer

func RegisterControlServer(s *grpc.Server, srv ControlServer)

Types

type CokeyRequest

type CokeyRequest struct {
}

CokeyRequest requests the collective key of a drand node

func (*CokeyRequest) Descriptor

func (*CokeyRequest) Descriptor() ([]byte, []int)

func (*CokeyRequest) ProtoMessage

func (*CokeyRequest) ProtoMessage()

func (*CokeyRequest) Reset

func (m *CokeyRequest) Reset()

func (*CokeyRequest) String

func (m *CokeyRequest) String() string

type CokeyResponse

type CokeyResponse struct {
	CoKey *element.Point `protobuf:"bytes,1,opt,name=coKey" json:"coKey,omitempty"`
}

CokeyResponse holds the collective key of a drand node

func (*CokeyResponse) Descriptor

func (*CokeyResponse) Descriptor() ([]byte, []int)

func (*CokeyResponse) GetCoKey

func (m *CokeyResponse) GetCoKey() *element.Point

func (*CokeyResponse) ProtoMessage

func (*CokeyResponse) ProtoMessage()

func (*CokeyResponse) Reset

func (m *CokeyResponse) Reset()

func (*CokeyResponse) String

func (m *CokeyResponse) String() string

type ControlClient

type ControlClient interface {
	// PingPong returns an empty message. Purpose is to test the control port.
	PingPong(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*Pong, error)
	// InitDKG sends information to daemon to start a fresh DKG protocol
	InitDKG(ctx context.Context, in *DKGRequest, opts ...grpc.CallOption) (*DKGResponse, error)
	// InitReshares sends all informations so that the drand node knows how to
	// proceeed during the next resharing protocol.
	InitReshare(ctx context.Context, in *ReshareRequest, opts ...grpc.CallOption) (*ReshareResponse, error)
	// Share returns the current private share used by the node
	Share(ctx context.Context, in *ShareRequest, opts ...grpc.CallOption) (*ShareResponse, error)
	// PublicKey returns the longterm public key of the drand node
	PublicKey(ctx context.Context, in *PublicKeyRequest, opts ...grpc.CallOption) (*PublicKeyResponse, error)
	// PrivateKey returns the longterm private key of the drand node
	PrivateKey(ctx context.Context, in *PrivateKeyRequest, opts ...grpc.CallOption) (*PrivateKeyResponse, error)
	// CollectiveKey returns the distributed public key used by the node
	CollectiveKey(ctx context.Context, in *CokeyRequest, opts ...grpc.CallOption) (*CokeyResponse, error)
	// Group returns the current group file used
	Group(ctx context.Context, in *GroupRequest, opts ...grpc.CallOption) (*GroupResponse, error)
}

func NewControlClient

func NewControlClient(cc *grpc.ClientConn) ControlClient

type ControlServer

type ControlServer interface {
	// PingPong returns an empty message. Purpose is to test the control port.
	PingPong(context.Context, *Ping) (*Pong, error)
	// InitDKG sends information to daemon to start a fresh DKG protocol
	InitDKG(context.Context, *DKGRequest) (*DKGResponse, error)
	// InitReshares sends all informations so that the drand node knows how to
	// proceeed during the next resharing protocol.
	InitReshare(context.Context, *ReshareRequest) (*ReshareResponse, error)
	// Share returns the current private share used by the node
	Share(context.Context, *ShareRequest) (*ShareResponse, error)
	// PublicKey returns the longterm public key of the drand node
	PublicKey(context.Context, *PublicKeyRequest) (*PublicKeyResponse, error)
	// PrivateKey returns the longterm private key of the drand node
	PrivateKey(context.Context, *PrivateKeyRequest) (*PrivateKeyResponse, error)
	// CollectiveKey returns the distributed public key used by the node
	CollectiveKey(context.Context, *CokeyRequest) (*CokeyResponse, error)
	// Group returns the current group file used
	Group(context.Context, *GroupRequest) (*GroupResponse, error)
}

type DKGRequest

type DKGRequest struct {
	DkgGroup *GroupInfo `protobuf:"bytes,1,opt,name=dkg_group,json=dkgGroup" json:"dkg_group,omitempty"`
	IsLeader bool       `protobuf:"varint,2,opt,name=is_leader,json=isLeader" json:"is_leader,omitempty"`
}

func (*DKGRequest) Descriptor

func (*DKGRequest) Descriptor() ([]byte, []int)

func (*DKGRequest) GetDkgGroup

func (m *DKGRequest) GetDkgGroup() *GroupInfo

func (*DKGRequest) GetIsLeader

func (m *DKGRequest) GetIsLeader() bool

func (*DKGRequest) ProtoMessage

func (*DKGRequest) ProtoMessage()

func (*DKGRequest) Reset

func (m *DKGRequest) Reset()

func (*DKGRequest) String

func (m *DKGRequest) String() string

type DKGResponse

type DKGResponse struct {
}

func (*DKGResponse) Descriptor

func (*DKGResponse) Descriptor() ([]byte, []int)

func (*DKGResponse) ProtoMessage

func (*DKGResponse) ProtoMessage()

func (*DKGResponse) Reset

func (m *DKGResponse) Reset()

func (*DKGResponse) String

func (m *DKGResponse) String() string

type GroupInfo

type GroupInfo struct {
	// Types that are valid to be assigned to Location:
	//	*GroupInfo_Path
	//	*GroupInfo_Url
	Location isGroupInfo_Location `protobuf_oneof:"location"`
}

func (*GroupInfo) Descriptor

func (*GroupInfo) Descriptor() ([]byte, []int)

func (*GroupInfo) GetLocation

func (m *GroupInfo) GetLocation() isGroupInfo_Location

func (*GroupInfo) GetPath

func (m *GroupInfo) GetPath() string

func (*GroupInfo) GetUrl

func (m *GroupInfo) GetUrl() string

func (*GroupInfo) ProtoMessage

func (*GroupInfo) ProtoMessage()

func (*GroupInfo) Reset

func (m *GroupInfo) Reset()

func (*GroupInfo) String

func (m *GroupInfo) String() string

func (*GroupInfo) XXX_OneofFuncs

func (*GroupInfo) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type GroupInfo_Path

type GroupInfo_Path struct {
	Path string `protobuf:"bytes,1,opt,name=path,oneof"`
}

type GroupInfo_Url

type GroupInfo_Url struct {
	Url string `protobuf:"bytes,2,opt,name=url,oneof"`
}

type GroupRequest

type GroupRequest struct {
}

func (*GroupRequest) Descriptor

func (*GroupRequest) Descriptor() ([]byte, []int)

func (*GroupRequest) ProtoMessage

func (*GroupRequest) ProtoMessage()

func (*GroupRequest) Reset

func (m *GroupRequest) Reset()

func (*GroupRequest) String

func (m *GroupRequest) String() string

type GroupResponse

type GroupResponse struct {
	// TOML-encoded group file
	Group string `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"`
}

func (*GroupResponse) Descriptor

func (*GroupResponse) Descriptor() ([]byte, []int)

func (*GroupResponse) GetGroup

func (m *GroupResponse) GetGroup() string

func (*GroupResponse) ProtoMessage

func (*GroupResponse) ProtoMessage()

func (*GroupResponse) Reset

func (m *GroupResponse) Reset()

func (*GroupResponse) String

func (m *GroupResponse) String() string

type Ping

type Ping struct {
}

func (*Ping) Descriptor

func (*Ping) Descriptor() ([]byte, []int)

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) Reset

func (m *Ping) Reset()

func (*Ping) String

func (m *Ping) String() string

type Pong

type Pong struct {
}

func (*Pong) Descriptor

func (*Pong) Descriptor() ([]byte, []int)

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) String

func (m *Pong) String() string

type PrivateKeyRequest

type PrivateKeyRequest struct {
}

PrivateKeyRequest requests the private key of a drand node

func (*PrivateKeyRequest) Descriptor

func (*PrivateKeyRequest) Descriptor() ([]byte, []int)

func (*PrivateKeyRequest) ProtoMessage

func (*PrivateKeyRequest) ProtoMessage()

func (*PrivateKeyRequest) Reset

func (m *PrivateKeyRequest) Reset()

func (*PrivateKeyRequest) String

func (m *PrivateKeyRequest) String() string

type PrivateKeyResponse

type PrivateKeyResponse struct {
	PriKey *element.Scalar `protobuf:"bytes,1,opt,name=priKey" json:"priKey,omitempty"`
}

PrivateKeyResponse holds the private key of a drand node

func (*PrivateKeyResponse) Descriptor

func (*PrivateKeyResponse) Descriptor() ([]byte, []int)

func (*PrivateKeyResponse) GetPriKey

func (m *PrivateKeyResponse) GetPriKey() *element.Scalar

func (*PrivateKeyResponse) ProtoMessage

func (*PrivateKeyResponse) ProtoMessage()

func (*PrivateKeyResponse) Reset

func (m *PrivateKeyResponse) Reset()

func (*PrivateKeyResponse) String

func (m *PrivateKeyResponse) String() string

type PublicKeyRequest

type PublicKeyRequest struct {
}

PublicKeyRequest requests the public key of a drand node

func (*PublicKeyRequest) Descriptor

func (*PublicKeyRequest) Descriptor() ([]byte, []int)

func (*PublicKeyRequest) ProtoMessage

func (*PublicKeyRequest) ProtoMessage()

func (*PublicKeyRequest) Reset

func (m *PublicKeyRequest) Reset()

func (*PublicKeyRequest) String

func (m *PublicKeyRequest) String() string

type PublicKeyResponse

type PublicKeyResponse struct {
	PubKey *element.Point `protobuf:"bytes,1,opt,name=pubKey" json:"pubKey,omitempty"`
}

PublicKeyResponse holds the public key of a drand node

func (*PublicKeyResponse) Descriptor

func (*PublicKeyResponse) Descriptor() ([]byte, []int)

func (*PublicKeyResponse) GetPubKey

func (m *PublicKeyResponse) GetPubKey() *element.Point

func (*PublicKeyResponse) ProtoMessage

func (*PublicKeyResponse) ProtoMessage()

func (*PublicKeyResponse) Reset

func (m *PublicKeyResponse) Reset()

func (*PublicKeyResponse) String

func (m *PublicKeyResponse) String() string

type ReshareRequest

type ReshareRequest struct {
	// Old group that needs to issue the shares for the new group
	// NOTE: It can be empty / nil. In that case, the drand node will try to
	// load the group he belongs to at the moment, if any, and use it as the old
	// group.
	Old      *GroupInfo `protobuf:"bytes,1,opt,name=old" json:"old,omitempty"`
	New      *GroupInfo `protobuf:"bytes,2,opt,name=new" json:"new,omitempty"`
	IsLeader bool       `protobuf:"varint,3,opt,name=is_leader,json=isLeader" json:"is_leader,omitempty"`
}

ReshareRequest contains references to the old and new group to perform the resharing protocol.

func (*ReshareRequest) Descriptor

func (*ReshareRequest) Descriptor() ([]byte, []int)

func (*ReshareRequest) GetIsLeader

func (m *ReshareRequest) GetIsLeader() bool

func (*ReshareRequest) GetNew

func (m *ReshareRequest) GetNew() *GroupInfo

func (*ReshareRequest) GetOld

func (m *ReshareRequest) GetOld() *GroupInfo

func (*ReshareRequest) ProtoMessage

func (*ReshareRequest) ProtoMessage()

func (*ReshareRequest) Reset

func (m *ReshareRequest) Reset()

func (*ReshareRequest) String

func (m *ReshareRequest) String() string

type ReshareResponse

type ReshareResponse struct {
}

func (*ReshareResponse) Descriptor

func (*ReshareResponse) Descriptor() ([]byte, []int)

func (*ReshareResponse) ProtoMessage

func (*ReshareResponse) ProtoMessage()

func (*ReshareResponse) Reset

func (m *ReshareResponse) Reset()

func (*ReshareResponse) String

func (m *ReshareResponse) String() string

type ShareRequest

type ShareRequest struct {
}

ShareRequest requests the private share of a drand node

func (*ShareRequest) Descriptor

func (*ShareRequest) Descriptor() ([]byte, []int)

func (*ShareRequest) ProtoMessage

func (*ShareRequest) ProtoMessage()

func (*ShareRequest) Reset

func (m *ShareRequest) Reset()

func (*ShareRequest) String

func (m *ShareRequest) String() string

type ShareResponse

type ShareResponse struct {
	Index uint32          `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
	Share *element.Scalar `protobuf:"bytes,2,opt,name=share" json:"share,omitempty"`
}

ShareResponse holds the private share of a drand node

func (*ShareResponse) Descriptor

func (*ShareResponse) Descriptor() ([]byte, []int)

func (*ShareResponse) GetIndex

func (m *ShareResponse) GetIndex() uint32

func (*ShareResponse) GetShare

func (m *ShareResponse) GetShare() *element.Scalar

func (*ShareResponse) ProtoMessage

func (*ShareResponse) ProtoMessage()

func (*ShareResponse) Reset

func (m *ShareResponse) Reset()

func (*ShareResponse) String

func (m *ShareResponse) String() string

Jump to

Keyboard shortcuts

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