paranoid

package
v0.0.0-...-1a6bc1e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package paranoid is a generated protocol buffer package.

It is generated from these files:

paranoidnetwork/paranoid.proto

It has these top-level messages:

EmptyMessage
Node
JoinClusterRequest
NewGenerationRequest
NewGenerationResponse
KeyPieceRequest
KeyPiece
KeyPieceSend
SendKeyPieceResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterParanoidNetworkServer

func RegisterParanoidNetworkServer(s *grpc.Server, srv ParanoidNetworkServer)

Types

type EmptyMessage

type EmptyMessage struct {
}

func (*EmptyMessage) Descriptor

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

func (*EmptyMessage) ProtoMessage

func (*EmptyMessage) ProtoMessage()

func (*EmptyMessage) Reset

func (m *EmptyMessage) Reset()

func (*EmptyMessage) String

func (m *EmptyMessage) String() string

type JoinClusterRequest

type JoinClusterRequest struct {
	Ip           string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"`
	Port         string `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"`
	CommonName   string `protobuf:"bytes,3,opt,name=common_name" json:"common_name,omitempty"`
	Uuid         string `protobuf:"bytes,4,opt,name=uuid" json:"uuid,omitempty"`
	PoolPassword string `protobuf:"bytes,5,opt,name=pool_password" json:"pool_password,omitempty"`
}

func (*JoinClusterRequest) Descriptor

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

func (*JoinClusterRequest) ProtoMessage

func (*JoinClusterRequest) ProtoMessage()

func (*JoinClusterRequest) Reset

func (m *JoinClusterRequest) Reset()

func (*JoinClusterRequest) String

func (m *JoinClusterRequest) String() string

type KeyPiece

type KeyPiece struct {
	Data              []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	ParentFingerprint []byte `protobuf:"bytes,2,opt,name=parent_fingerprint,proto3" json:"parent_fingerprint,omitempty"`
	Prime             []byte `protobuf:"bytes,3,opt,name=prime,proto3" json:"prime,omitempty"`
	Seq               int64  `protobuf:"varint,4,opt,name=seq" json:"seq,omitempty"`
	// The Node data for the node who owns this KeyPiece
	OwnerNode *Node `protobuf:"bytes,5,opt,name=owner_node" json:"owner_node,omitempty"`
	// The KeyStateMachine generation this key belongs to
	Generation int64 `protobuf:"varint,6,opt,name=generation" json:"generation,omitempty"`
}

func (*KeyPiece) Descriptor

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

func (*KeyPiece) GetOwnerNode

func (m *KeyPiece) GetOwnerNode() *Node

func (*KeyPiece) ProtoMessage

func (*KeyPiece) ProtoMessage()

func (*KeyPiece) Reset

func (m *KeyPiece) Reset()

func (*KeyPiece) String

func (m *KeyPiece) String() string

type KeyPieceRequest

type KeyPieceRequest struct {
	Node       *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
	Generation int64 `protobuf:"varint,2,opt,name=generation" json:"generation,omitempty"`
}

func (*KeyPieceRequest) Descriptor

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

func (*KeyPieceRequest) GetNode

func (m *KeyPieceRequest) GetNode() *Node

func (*KeyPieceRequest) ProtoMessage

func (*KeyPieceRequest) ProtoMessage()

func (*KeyPieceRequest) Reset

func (m *KeyPieceRequest) Reset()

func (*KeyPieceRequest) String

func (m *KeyPieceRequest) String() string

type KeyPieceSend

type KeyPieceSend struct {
	Key        *KeyPiece `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	AddElement bool      `protobuf:"varint,2,opt,name=add_element" json:"add_element,omitempty"`
}

func (*KeyPieceSend) Descriptor

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

func (*KeyPieceSend) GetKey

func (m *KeyPieceSend) GetKey() *KeyPiece

func (*KeyPieceSend) ProtoMessage

func (*KeyPieceSend) ProtoMessage()

func (*KeyPieceSend) Reset

func (m *KeyPieceSend) Reset()

func (*KeyPieceSend) String

func (m *KeyPieceSend) String() string

type NewGenerationRequest

type NewGenerationRequest struct {
	RequestingNode *Node  `protobuf:"bytes,1,opt,name=requesting_node" json:"requesting_node,omitempty"`
	PoolPassword   string `protobuf:"bytes,2,opt,name=pool_password" json:"pool_password,omitempty"`
}

func (*NewGenerationRequest) Descriptor

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

func (*NewGenerationRequest) GetRequestingNode

func (m *NewGenerationRequest) GetRequestingNode() *Node

func (*NewGenerationRequest) ProtoMessage

func (*NewGenerationRequest) ProtoMessage()

func (*NewGenerationRequest) Reset

func (m *NewGenerationRequest) Reset()

func (*NewGenerationRequest) String

func (m *NewGenerationRequest) String() string

type NewGenerationResponse

type NewGenerationResponse struct {
	GenerationNumber int64    `protobuf:"varint,1,opt,name=generation_number" json:"generation_number,omitempty"`
	Peers            []string `protobuf:"bytes,2,rep,name=peers" json:"peers,omitempty"`
}

func (*NewGenerationResponse) Descriptor

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

func (*NewGenerationResponse) ProtoMessage

func (*NewGenerationResponse) ProtoMessage()

func (*NewGenerationResponse) Reset

func (m *NewGenerationResponse) Reset()

func (*NewGenerationResponse) String

func (m *NewGenerationResponse) String() string

type Node

type Node struct {
	Ip         string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"`
	Port       string `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"`
	CommonName string `protobuf:"bytes,3,opt,name=common_name" json:"common_name,omitempty"`
	Uuid       string `protobuf:"bytes,4,opt,name=uuid" json:"uuid,omitempty"`
}

func (*Node) Descriptor

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

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

type ParanoidNetworkClient

type ParanoidNetworkClient interface {
	// Used for health checking and discovery. Sends the IP and port of the
	// PFSD instance running on the client.
	Ping(ctx context.Context, in *Node, opts ...grpc.CallOption) (*EmptyMessage, error)
	// Used by a new node to let other nodes it is available to join the cluster.
	JoinCluster(ctx context.Context, in *JoinClusterRequest, opts ...grpc.CallOption) (*EmptyMessage, error)
	// Used by a new node to create a new key generation before joining the cluster.
	NewGeneration(ctx context.Context, in *NewGenerationRequest, opts ...grpc.CallOption) (*NewGenerationResponse, error)
	// Cryptography calls
	SendKeyPiece(ctx context.Context, in *KeyPieceSend, opts ...grpc.CallOption) (*SendKeyPieceResponse, error)
	RequestKeyPiece(ctx context.Context, in *KeyPieceRequest, opts ...grpc.CallOption) (*KeyPiece, error)
}

func NewParanoidNetworkClient

func NewParanoidNetworkClient(cc *grpc.ClientConn) ParanoidNetworkClient

type ParanoidNetworkServer

type ParanoidNetworkServer interface {
	// Used for health checking and discovery. Sends the IP and port of the
	// PFSD instance running on the client.
	Ping(context.Context, *Node) (*EmptyMessage, error)
	// Used by a new node to let other nodes it is available to join the cluster.
	JoinCluster(context.Context, *JoinClusterRequest) (*EmptyMessage, error)
	// Used by a new node to create a new key generation before joining the cluster.
	NewGeneration(context.Context, *NewGenerationRequest) (*NewGenerationResponse, error)
	// Cryptography calls
	SendKeyPiece(context.Context, *KeyPieceSend) (*SendKeyPieceResponse, error)
	RequestKeyPiece(context.Context, *KeyPieceRequest) (*KeyPiece, error)
}

type SendKeyPieceResponse

type SendKeyPieceResponse struct {
	ClientMustCommit bool `protobuf:"varint,1,opt,name=client_must_commit" json:"client_must_commit,omitempty"`
}

func (*SendKeyPieceResponse) Descriptor

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

func (*SendKeyPieceResponse) ProtoMessage

func (*SendKeyPieceResponse) ProtoMessage()

func (*SendKeyPieceResponse) Reset

func (m *SendKeyPieceResponse) Reset()

func (*SendKeyPieceResponse) String

func (m *SendKeyPieceResponse) String() string

Jump to

Keyboard shortcuts

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