Documentation
¶
Index ¶
- Variables
- func RegisterLanternServer(s grpc.ServiceRegistrar, srv LanternServer)
- type DumpResponse
- type Edge
- type Graph
- type IlluminateRequest
- func (*IlluminateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IlluminateRequest) GetMaxWeight() float32
- func (x *IlluminateRequest) GetMinWeight() float32
- func (x *IlluminateRequest) GetSeed() *Vertex
- func (x *IlluminateRequest) GetStep() uint32
- func (*IlluminateRequest) ProtoMessage()
- func (x *IlluminateRequest) ProtoReflect() protoreflect.Message
- func (x *IlluminateRequest) Reset()
- func (x *IlluminateRequest) String() string
- type IlluminateResponse
- func (*IlluminateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *IlluminateResponse) GetGraph() *Graph
- func (x *IlluminateResponse) GetStatus() Status
- func (*IlluminateResponse) ProtoMessage()
- func (x *IlluminateResponse) ProtoReflect() protoreflect.Message
- func (x *IlluminateResponse) Reset()
- func (x *IlluminateResponse) String() string
- type LanternClient
- type LanternServer
- type Neighbor
- type Status
- type UnimplementedLanternServer
- type UnsafeLanternServer
- type Vertex
- func (*Vertex) Descriptor() ([]byte, []int)deprecated
- func (x *Vertex) GetBool() bool
- func (x *Vertex) GetBytes() []byte
- func (x *Vertex) GetFloat32() float32
- func (x *Vertex) GetFloat64() float64
- func (x *Vertex) GetInt32() int32
- func (x *Vertex) GetInt64() int64
- func (x *Vertex) GetKey() string
- func (x *Vertex) GetNil() bool
- func (x *Vertex) GetString_() string
- func (x *Vertex) GetTimestamp() *timestamppb.Timestamp
- func (x *Vertex) GetUint32() uint32
- func (x *Vertex) GetUint64() uint64
- func (m *Vertex) GetValue() isVertex_Value
- func (*Vertex) ProtoMessage()
- func (x *Vertex) ProtoReflect() protoreflect.Message
- func (x *Vertex) Reset()
- func (x *Vertex) String() string
- type Vertex_Bool
- type Vertex_Bytes
- type Vertex_Float32
- type Vertex_Float64
- type Vertex_Int32
- type Vertex_Int64
- type Vertex_Nil
- type Vertex_String_
- type Vertex_Timestamp
- type Vertex_Uint32
- type Vertex_Uint64
Constants ¶
This section is empty.
Variables ¶
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.
var File_data_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*Edge) ProtoMessage()
func (*Edge) ProtoReflect ¶
func (x *Edge) ProtoReflect() protoreflect.Message
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) GetNeighborMap ¶
func (*Graph) GetVertexMap ¶
func (*Graph) ProtoMessage ¶
func (*Graph) ProtoMessage()
func (*Graph) ProtoReflect ¶
func (x *Graph) ProtoReflect() protoreflect.Message
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) GetWeightMap ¶
func (*Neighbor) ProtoMessage ¶
func (*Neighbor) ProtoMessage()
func (*Neighbor) ProtoReflect ¶
func (x *Neighbor) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
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) DumpEdge(context.Context, *Edge) (*DumpResponse, error)
func (UnimplementedLanternServer) DumpVertex ¶
func (UnimplementedLanternServer) DumpVertex(context.Context, *Vertex) (*DumpResponse, error)
func (UnimplementedLanternServer) Illuminate ¶
func (UnimplementedLanternServer) Illuminate(context.Context, *IlluminateRequest) (*IlluminateResponse, error)
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) GetFloat32 ¶
func (*Vertex) GetFloat64 ¶
func (*Vertex) GetString_ ¶
func (*Vertex) GetTimestamp ¶
func (x *Vertex) GetTimestamp() *timestamppb.Timestamp
func (*Vertex) ProtoMessage ¶
func (*Vertex) ProtoMessage()
func (*Vertex) ProtoReflect ¶
func (x *Vertex) ProtoReflect() protoreflect.Message
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"`
}