pb

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "OK",
		1: "INTERNAL_SERVER_ERROR",
		2: "INVALID_REQUEST",
	}
	Status_value = map[string]int32{
		"OK":                    0,
		"INTERNAL_SERVER_ERROR": 1,
		"INVALID_REQUEST":       2,
	}
)

Enum value maps for Status.

View Source
var Lantern_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Lantern",
	HandlerType: (*LanternServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Illuminate",
			Handler:    _Lantern_Illuminate_Handler,
		},
		{
			MethodName: "DumpVertex",
			Handler:    _Lantern_DumpVertex_Handler,
		},
		{
			MethodName: "DumpEdge",
			Handler:    _Lantern_DumpEdge_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "data.proto",
}

Lantern_ServiceDesc is the grpc.ServiceDesc for Lantern service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLanternServer

func RegisterLanternServer(s grpc.ServiceRegistrar, srv LanternServer)

Types

type DumpResponse

type DumpResponse struct {
	Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DumpResponse) Descriptor deprecated

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

Deprecated: Use DumpResponse.ProtoReflect.Descriptor instead.

func (*DumpResponse) GetStatus

func (x *DumpResponse) GetStatus() Status

func (*DumpResponse) ProtoMessage

func (*DumpResponse) ProtoMessage()

func (*DumpResponse) ProtoReflect

func (x *DumpResponse) ProtoReflect() protoreflect.Message

func (*DumpResponse) Reset

func (x *DumpResponse) Reset()

func (*DumpResponse) String

func (x *DumpResponse) String() string

type Edge

type Edge struct {
	Tail   *Vertex `protobuf:"bytes,1,opt,name=tail,proto3" json:"tail,omitempty"`
	Head   *Vertex `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
	Weight float32 `protobuf:"fixed32,3,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

func (*Edge) Descriptor deprecated

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

Deprecated: Use Edge.ProtoReflect.Descriptor instead.

func (*Edge) GetHead

func (x *Edge) GetHead() *Vertex

func (*Edge) GetTail

func (x *Edge) GetTail() *Vertex

func (*Edge) GetWeight

func (x *Edge) GetWeight() float32

func (*Edge) ProtoMessage

func (*Edge) ProtoMessage()

func (*Edge) ProtoReflect

func (x *Edge) ProtoReflect() protoreflect.Message

func (*Edge) Reset

func (x *Edge) Reset()

func (*Edge) String

func (x *Edge) String() string

type Graph

type Graph struct {
	VertexMap   map[string]*Vertex   `` /* 176-byte string literal not displayed */
	NeighborMap map[string]*Neighbor `` /* 182-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Graph) Descriptor deprecated

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

Deprecated: Use Graph.ProtoReflect.Descriptor instead.

func (*Graph) GetNeighborMap

func (x *Graph) GetNeighborMap() map[string]*Neighbor

func (*Graph) GetVertexMap

func (x *Graph) GetVertexMap() map[string]*Vertex

func (*Graph) ProtoMessage

func (*Graph) ProtoMessage()

func (*Graph) ProtoReflect

func (x *Graph) ProtoReflect() protoreflect.Message

func (*Graph) Reset

func (x *Graph) Reset()

func (*Graph) String

func (x *Graph) String() string

type IlluminateRequest

type IlluminateRequest struct {
	Seed      *Vertex `protobuf:"bytes,1,opt,name=seed,proto3" json:"seed,omitempty"`
	Step      uint32  `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"`
	MinWeight float32 `protobuf:"fixed32,3,opt,name=min_weight,json=minWeight,proto3" json:"min_weight,omitempty"`
	MaxWeight float32 `protobuf:"fixed32,4,opt,name=max_weight,json=maxWeight,proto3" json:"max_weight,omitempty"`
	// contains filtered or unexported fields
}

func (*IlluminateRequest) Descriptor deprecated

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

Deprecated: Use IlluminateRequest.ProtoReflect.Descriptor instead.

func (*IlluminateRequest) GetMaxWeight

func (x *IlluminateRequest) GetMaxWeight() float32

func (*IlluminateRequest) GetMinWeight

func (x *IlluminateRequest) GetMinWeight() float32

func (*IlluminateRequest) GetSeed

func (x *IlluminateRequest) GetSeed() *Vertex

func (*IlluminateRequest) GetStep

func (x *IlluminateRequest) GetStep() uint32

func (*IlluminateRequest) ProtoMessage

func (*IlluminateRequest) ProtoMessage()

func (*IlluminateRequest) ProtoReflect

func (x *IlluminateRequest) ProtoReflect() protoreflect.Message

func (*IlluminateRequest) Reset

func (x *IlluminateRequest) Reset()

func (*IlluminateRequest) String

func (x *IlluminateRequest) String() string

type IlluminateResponse

type IlluminateResponse struct {
	Graph  *Graph `protobuf:"bytes,1,opt,name=graph,proto3" json:"graph,omitempty"`
	Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*IlluminateResponse) Descriptor deprecated

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

Deprecated: Use IlluminateResponse.ProtoReflect.Descriptor instead.

func (*IlluminateResponse) GetGraph

func (x *IlluminateResponse) GetGraph() *Graph

func (*IlluminateResponse) GetStatus

func (x *IlluminateResponse) GetStatus() Status

func (*IlluminateResponse) ProtoMessage

func (*IlluminateResponse) ProtoMessage()

func (*IlluminateResponse) ProtoReflect

func (x *IlluminateResponse) ProtoReflect() protoreflect.Message

func (*IlluminateResponse) Reset

func (x *IlluminateResponse) Reset()

func (*IlluminateResponse) String

func (x *IlluminateResponse) String() string

type LanternClient

type LanternClient interface {
	Illuminate(ctx context.Context, in *IlluminateRequest, opts ...grpc.CallOption) (*IlluminateResponse, error)
	DumpVertex(ctx context.Context, in *Vertex, opts ...grpc.CallOption) (*DumpResponse, error)
	DumpEdge(ctx context.Context, in *Edge, opts ...grpc.CallOption) (*DumpResponse, error)
}

LanternClient is the client API for Lantern service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewLanternClient

func NewLanternClient(cc grpc.ClientConnInterface) LanternClient

type LanternServer

type LanternServer interface {
	Illuminate(context.Context, *IlluminateRequest) (*IlluminateResponse, error)
	DumpVertex(context.Context, *Vertex) (*DumpResponse, error)
	DumpEdge(context.Context, *Edge) (*DumpResponse, error)
	// contains filtered or unexported methods
}

LanternServer is the server API for Lantern service. All implementations must embed UnimplementedLanternServer for forward compatibility

type Neighbor

type Neighbor struct {
	WeightMap map[string]float32 `` /* 178-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Neighbor) Descriptor deprecated

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

Deprecated: Use Neighbor.ProtoReflect.Descriptor instead.

func (*Neighbor) GetWeightMap

func (x *Neighbor) GetWeightMap() map[string]float32

func (*Neighbor) ProtoMessage

func (*Neighbor) ProtoMessage()

func (*Neighbor) ProtoReflect

func (x *Neighbor) ProtoReflect() protoreflect.Message

func (*Neighbor) Reset

func (x *Neighbor) Reset()

func (*Neighbor) String

func (x *Neighbor) String() string

type Status

type Status int32
const (
	Status_OK                    Status = 0
	Status_INTERNAL_SERVER_ERROR Status = 1
	Status_INVALID_REQUEST       Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedLanternServer

type UnimplementedLanternServer struct {
}

UnimplementedLanternServer must be embedded to have forward compatible implementations.

func (UnimplementedLanternServer) DumpEdge

func (UnimplementedLanternServer) DumpVertex

func (UnimplementedLanternServer) Illuminate

type UnsafeLanternServer

type UnsafeLanternServer interface {
	// contains filtered or unexported methods
}

UnsafeLanternServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LanternServer will result in compilation errors.

type Vertex

type Vertex struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Types that are assignable to Value:
	//	*Vertex_Float64
	//	*Vertex_Float32
	//	*Vertex_Int32
	//	*Vertex_Int64
	//	*Vertex_Uint32
	//	*Vertex_Uint64
	//	*Vertex_Bool
	//	*Vertex_String_
	//	*Vertex_Bytes
	//	*Vertex_Timestamp
	//	*Vertex_Nil
	Value isVertex_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*Vertex) Descriptor deprecated

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

Deprecated: Use Vertex.ProtoReflect.Descriptor instead.

func (*Vertex) GetBool

func (x *Vertex) GetBool() bool

func (*Vertex) GetBytes

func (x *Vertex) GetBytes() []byte

func (*Vertex) GetFloat32

func (x *Vertex) GetFloat32() float32

func (*Vertex) GetFloat64

func (x *Vertex) GetFloat64() float64

func (*Vertex) GetInt32

func (x *Vertex) GetInt32() int32

func (*Vertex) GetInt64

func (x *Vertex) GetInt64() int64

func (*Vertex) GetKey

func (x *Vertex) GetKey() string

func (*Vertex) GetNil

func (x *Vertex) GetNil() bool

func (*Vertex) GetString_

func (x *Vertex) GetString_() string

func (*Vertex) GetTimestamp

func (x *Vertex) GetTimestamp() *timestamppb.Timestamp

func (*Vertex) GetUint32

func (x *Vertex) GetUint32() uint32

func (*Vertex) GetUint64

func (x *Vertex) GetUint64() uint64

func (*Vertex) GetValue

func (m *Vertex) GetValue() isVertex_Value

func (*Vertex) ProtoMessage

func (*Vertex) ProtoMessage()

func (*Vertex) ProtoReflect

func (x *Vertex) ProtoReflect() protoreflect.Message

func (*Vertex) Reset

func (x *Vertex) Reset()

func (*Vertex) String

func (x *Vertex) String() string

type Vertex_Bool

type Vertex_Bool struct {
	Bool bool `protobuf:"varint,8,opt,name=bool,proto3,oneof"`
}

type Vertex_Bytes

type Vertex_Bytes struct {
	Bytes []byte `protobuf:"bytes,10,opt,name=bytes,proto3,oneof"`
}

type Vertex_Float32

type Vertex_Float32 struct {
	Float32 float32 `protobuf:"fixed32,3,opt,name=float32,proto3,oneof"`
}

type Vertex_Float64

type Vertex_Float64 struct {
	Float64 float64 `protobuf:"fixed64,2,opt,name=float64,proto3,oneof"`
}

type Vertex_Int32

type Vertex_Int32 struct {
	Int32 int32 `protobuf:"varint,4,opt,name=int32,proto3,oneof"`
}

type Vertex_Int64

type Vertex_Int64 struct {
	Int64 int64 `protobuf:"varint,5,opt,name=int64,proto3,oneof"`
}

type Vertex_Nil

type Vertex_Nil struct {
	Nil bool `protobuf:"varint,30,opt,name=nil,proto3,oneof"`
}

type Vertex_String_

type Vertex_String_ struct {
	String_ string `protobuf:"bytes,9,opt,name=string,proto3,oneof"`
}

type Vertex_Timestamp

type Vertex_Timestamp struct {
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=timestamp,proto3,oneof"`
}

type Vertex_Uint32

type Vertex_Uint32 struct {
	Uint32 uint32 `protobuf:"varint,6,opt,name=uint32,proto3,oneof"`
}

type Vertex_Uint64

type Vertex_Uint64 struct {
	Uint64 uint64 `protobuf:"varint,7,opt,name=uint64,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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