node

package
v0.0.0-...-bda66fc Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: ISC Imports: 6 Imported by: 0

Documentation

Overview

Package node is a generated protocol buffer package.

It is generated from these files:

node.proto

It has these top-level messages:

Info
Void
Site
SuccessReturn

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDistributionServiceServer

func RegisterDistributionServiceServer(s *grpc.Server, srv DistributionServiceServer)

Types

type DistributionServiceClient

type DistributionServiceClient interface {
	GetInfo(ctx context.Context, in *Info, opts ...grpc.CallOption) (*Info, error)
	AddSite(ctx context.Context, in *Site, opts ...grpc.CallOption) (*SuccessReturn, error)
	Splice(ctx context.Context, opts ...grpc.CallOption) (DistributionService_SpliceClient, error)
}

func NewDistributionServiceClient

func NewDistributionServiceClient(cc *grpc.ClientConn) DistributionServiceClient

type DistributionServiceServer

type DistributionServiceServer interface {
	GetInfo(context.Context, *Info) (*Info, error)
	AddSite(context.Context, *Site) (*SuccessReturn, error)
	Splice(DistributionService_SpliceServer) error
}

type DistributionService_SpliceClient

type DistributionService_SpliceClient interface {
	Send(*Site) error
	CloseAndRecv() (*SuccessReturn, error)
	grpc.ClientStream
}

type DistributionService_SpliceServer

type DistributionService_SpliceServer interface {
	SendAndClose(*SuccessReturn) error
	Recv() (*Site, error)
	grpc.ServerStream
}

type Info

type Info struct {
	Version         string   `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"`
	Length          uint64   `protobuf:"varint,2,opt,name=Length" json:"Length,omitempty"`
	ListenInterface string   `protobuf:"bytes,3,opt,name=ListenInterface" json:"ListenInterface,omitempty"`
	Connections     []string `protobuf:"bytes,4,rep,name=Connections" json:"Connections,omitempty"`
	Hashes          [][]byte `protobuf:"bytes,5,rep,name=Hashes,proto3" json:"Hashes,omitempty"`
}

func (*Info) Descriptor

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

func (*Info) GetConnections

func (m *Info) GetConnections() []string

func (*Info) GetHashes

func (m *Info) GetHashes() [][]byte

func (*Info) GetLength

func (m *Info) GetLength() uint64

func (*Info) GetListenInterface

func (m *Info) GetListenInterface() string

func (*Info) GetVersion

func (m *Info) GetVersion() string

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) Reset

func (m *Info) Reset()

func (*Info) String

func (m *Info) String() string

type Site

type Site struct {
	Validates [][]byte `protobuf:"bytes,1,rep,name=Validates,proto3" json:"Validates,omitempty"`
	Nonce     uint64   `protobuf:"varint,2,opt,name=Nonce" json:"Nonce,omitempty"`
	Content   []byte   `protobuf:"bytes,3,opt,name=Content,proto3" json:"Content,omitempty"`
	Type      string   `protobuf:"bytes,4,opt,name=Type" json:"Type,omitempty"`
	Data      []byte   `protobuf:"bytes,5,opt,name=Data,proto3" json:"Data,omitempty"`
	Tip       bool     `protobuf:"varint,6,opt,name=Tip" json:"Tip,omitempty"`
}

func FromObject

func FromObject(o *tangle.Object) (*Site, error)

FromObject converts a regular site into a distribution ready site

func (*Site) Descriptor

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

func (*Site) GetContent

func (m *Site) GetContent() []byte

func (*Site) GetData

func (m *Site) GetData() []byte

func (*Site) GetNonce

func (m *Site) GetNonce() uint64

func (*Site) GetTip

func (m *Site) GetTip() bool

func (*Site) GetType

func (m *Site) GetType() string

func (*Site) GetValidates

func (m *Site) GetValidates() [][]byte

func (*Site) ProtoMessage

func (*Site) ProtoMessage()

func (*Site) Reset

func (m *Site) Reset()

func (*Site) String

func (m *Site) String() string

type SuccessReturn

type SuccessReturn struct {
}

func (*SuccessReturn) Descriptor

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

func (*SuccessReturn) ProtoMessage

func (*SuccessReturn) ProtoMessage()

func (*SuccessReturn) Reset

func (m *SuccessReturn) Reset()

func (*SuccessReturn) String

func (m *SuccessReturn) String() string

type Void

type Void struct {
}

func (*Void) Descriptor

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

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) Reset

func (m *Void) Reset()

func (*Void) String

func (m *Void) String() string

Jump to

Keyboard shortcuts

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