storage

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package storage is a generated protocol buffer package.

It is generated from these files:

libri/common/storage/storage.proto

It has these top-level messages:

Address
QueryOutcomes
QueryTypeOutcomes
Peer
RoutingTable
DocumentMetrics
ReplicationMetrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// IP address
	Ip string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"`
	// TCP port
	Port uint32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
}

Address is a IPv4 address.

func (*Address) Descriptor

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

func (*Address) GetIp

func (m *Address) GetIp() string

func (*Address) GetPort

func (m *Address) GetPort() uint32

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) String

func (m *Address) String() string

type DocumentMetrics

type DocumentMetrics struct {
	NDocuments uint64 `protobuf:"varint,1,opt,name=n_documents,json=nDocuments" json:"n_documents,omitempty"`
	TotalSize  uint64 `protobuf:"varint,2,opt,name=total_size,json=totalSize" json:"total_size,omitempty"`
}

func (*DocumentMetrics) Descriptor

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

func (*DocumentMetrics) GetNDocuments

func (m *DocumentMetrics) GetNDocuments() uint64

func (*DocumentMetrics) GetTotalSize

func (m *DocumentMetrics) GetTotalSize() uint64

func (*DocumentMetrics) ProtoMessage

func (*DocumentMetrics) ProtoMessage()

func (*DocumentMetrics) Reset

func (m *DocumentMetrics) Reset()

func (*DocumentMetrics) String

func (m *DocumentMetrics) String() string

type Peer

type Peer struct {
	// big-endian byte representation of 32-byte ID
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// self-reported name of the peer
	Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	// public IP address
	PublicAddress *Address `protobuf:"bytes,3,opt,name=public_address,json=publicAddress" json:"public_address,omitempty"`
	// response history
	QueryOutcomes *QueryOutcomes `protobuf:"bytes,4,opt,name=query_outcomes,json=queryOutcomes" json:"query_outcomes,omitempty"`
}

Peer is the basic information associated with each peer in the network.

func (*Peer) Descriptor

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

func (*Peer) GetId

func (m *Peer) GetId() []byte

func (*Peer) GetName

func (m *Peer) GetName() string

func (*Peer) GetPublicAddress

func (m *Peer) GetPublicAddress() *Address

func (*Peer) GetQueryOutcomes

func (m *Peer) GetQueryOutcomes() *QueryOutcomes

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) String

func (m *Peer) String() string

type QueryOutcomes

type QueryOutcomes struct {
	Requests  *QueryTypeOutcomes `protobuf:"bytes,1,opt,name=requests" json:"requests,omitempty"`
	Responses *QueryTypeOutcomes `protobuf:"bytes,2,opt,name=responses" json:"responses,omitempty"`
}

func (*QueryOutcomes) Descriptor

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

func (*QueryOutcomes) GetRequests

func (m *QueryOutcomes) GetRequests() *QueryTypeOutcomes

func (*QueryOutcomes) GetResponses

func (m *QueryOutcomes) GetResponses() *QueryTypeOutcomes

func (*QueryOutcomes) ProtoMessage

func (*QueryOutcomes) ProtoMessage()

func (*QueryOutcomes) Reset

func (m *QueryOutcomes) Reset()

func (*QueryOutcomes) String

func (m *QueryOutcomes) String() string

type QueryTypeOutcomes

type QueryTypeOutcomes struct {
	// epoch time (seconds since 1970 UTC) of the earliest response from the peer
	Earliest int64 `protobuf:"varint,1,opt,name=earliest" json:"earliest,omitempty"`
	// epoch time of the latest response from the peer
	Latest int64 `protobuf:"varint,2,opt,name=latest" json:"latest,omitempty"`
	// number of queries sent to the peer
	NQueries uint64 `protobuf:"varint,3,opt,name=n_queries,json=nQueries" json:"n_queries,omitempty"`
	// number of queries that errored
	NErrors uint64 `protobuf:"varint,4,opt,name=n_errors,json=nErrors" json:"n_errors,omitempty"`
}

Responses contains statistics about a Peer's query history.

func (*QueryTypeOutcomes) Descriptor

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

func (*QueryTypeOutcomes) GetEarliest

func (m *QueryTypeOutcomes) GetEarliest() int64

func (*QueryTypeOutcomes) GetLatest

func (m *QueryTypeOutcomes) GetLatest() int64

func (*QueryTypeOutcomes) GetNErrors

func (m *QueryTypeOutcomes) GetNErrors() uint64

func (*QueryTypeOutcomes) GetNQueries

func (m *QueryTypeOutcomes) GetNQueries() uint64

func (*QueryTypeOutcomes) ProtoMessage

func (*QueryTypeOutcomes) ProtoMessage()

func (*QueryTypeOutcomes) Reset

func (m *QueryTypeOutcomes) Reset()

func (*QueryTypeOutcomes) String

func (m *QueryTypeOutcomes) String() string

type ReplicationMetrics

type ReplicationMetrics struct {
	// n_verified is the total number of verified documents (fully or partial)
	NVerified uint64 `protobuf:"varint,1,opt,name=n_verified,json=nVerified" json:"n_verified,omitempty"`
	// n_underreplicated is the number of under-repliced documents found
	NUnderreplicated uint64 `protobuf:"varint,2,opt,name=n_underreplicated,json=nUnderreplicated" json:"n_underreplicated,omitempty"`
	// n_replicated is the number of documents successfully replicated
	NReplicated uint64 `protobuf:"varint,3,opt,name=n_replicated,json=nReplicated" json:"n_replicated,omitempty"`
	// latest_pass is the epoch time (in seconds) since the last full replication
	LatestPass int64 `protobuf:"varint,4,opt,name=latest_pass,json=latestPass" json:"latest_pass,omitempty"`
}

func (*ReplicationMetrics) Descriptor

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

func (*ReplicationMetrics) GetLatestPass

func (m *ReplicationMetrics) GetLatestPass() int64

func (*ReplicationMetrics) GetNReplicated

func (m *ReplicationMetrics) GetNReplicated() uint64

func (*ReplicationMetrics) GetNUnderreplicated

func (m *ReplicationMetrics) GetNUnderreplicated() uint64

func (*ReplicationMetrics) GetNVerified

func (m *ReplicationMetrics) GetNVerified() uint64

func (*ReplicationMetrics) ProtoMessage

func (*ReplicationMetrics) ProtoMessage()

func (*ReplicationMetrics) Reset

func (m *ReplicationMetrics) Reset()

func (*ReplicationMetrics) String

func (m *ReplicationMetrics) String() string

type RoutingTable

type RoutingTable struct {
	// big-endian byte representation of 32-byte self ID
	SelfId []byte `protobuf:"bytes,1,opt,name=self_id,json=selfId,proto3" json:"self_id,omitempty"`
	// array of peers in table
	Peers []*Peer `protobuf:"bytes,2,rep,name=peers" json:"peers,omitempty"`
}

StoredRoutingTable contains the essential information associated with a routing table.

func (*RoutingTable) Descriptor

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

func (*RoutingTable) GetPeers

func (m *RoutingTable) GetPeers() []*Peer

func (*RoutingTable) GetSelfId

func (m *RoutingTable) GetSelfId() []byte

func (*RoutingTable) ProtoMessage

func (*RoutingTable) ProtoMessage()

func (*RoutingTable) Reset

func (m *RoutingTable) Reset()

func (*RoutingTable) String

func (m *RoutingTable) String() string

Jump to

Keyboard shortcuts

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