Documentation
¶
Index ¶
- Variables
- func NewGraphEndpoints() []*api.Endpoint
- func RegisterGraphHandler(s server.Server, hdlr GraphHandler, opts ...server.HandlerOption) error
- type DumpReq
- type DumpResp
- type EdgeReq
- func (*EdgeReq) Descriptor() ([]byte, []int)deprecated
- func (x *EdgeReq) GetLabel() string
- func (x *EdgeReq) GetProperties() map[string][]byte
- func (x *EdgeReq) GetSourceUid() string
- func (x *EdgeReq) GetTargetUid() string
- func (x *EdgeReq) GetUid() string
- func (*EdgeReq) ProtoMessage()
- func (x *EdgeReq) ProtoReflect() protoreflect.Message
- func (x *EdgeReq) Reset()
- func (x *EdgeReq) String() string
- type EdgeResp
- func (*EdgeResp) Descriptor() ([]byte, []int)deprecated
- func (x *EdgeResp) GetLabel() string
- func (x *EdgeResp) GetProperties() map[string][]byte
- func (x *EdgeResp) GetSourceUid() string
- func (x *EdgeResp) GetTargetUid() string
- func (x *EdgeResp) GetUid() string
- func (*EdgeResp) ProtoMessage()
- func (x *EdgeResp) ProtoReflect() protoreflect.Message
- func (x *EdgeResp) Reset()
- func (x *EdgeResp) String() string
- type EdgesReq
- func (*EdgesReq) Descriptor() ([]byte, []int)deprecated
- func (x *EdgesReq) GetLabel() []string
- func (x *EdgesReq) GetProperties() map[string][]byte
- func (x *EdgesReq) GetSourceUid() string
- func (x *EdgesReq) GetTargetUid() string
- func (*EdgesReq) ProtoMessage()
- func (x *EdgesReq) ProtoReflect() protoreflect.Message
- func (x *EdgesReq) Reset()
- func (x *EdgesReq) String() string
- type GraphHandler
- type GraphService
- type Graph_EdgesService
- type Graph_EdgesStream
- type Graph_NodesService
- type Graph_NodesStream
- type NodeReq
- func (*NodeReq) Descriptor() ([]byte, []int)deprecated
- func (x *NodeReq) GetLabel() string
- func (x *NodeReq) GetProperties() map[string][]byte
- func (x *NodeReq) GetUid() string
- func (*NodeReq) ProtoMessage()
- func (x *NodeReq) ProtoReflect() protoreflect.Message
- func (x *NodeReq) Reset()
- func (x *NodeReq) String() string
- type NodeResp
- func (*NodeResp) Descriptor() ([]byte, []int)deprecated
- func (x *NodeResp) GetInEdges() []string
- func (x *NodeResp) GetLabel() string
- func (x *NodeResp) GetOutEdges() []string
- func (x *NodeResp) GetProperties() map[string][]byte
- func (x *NodeResp) GetUid() string
- func (*NodeResp) ProtoMessage()
- func (x *NodeResp) ProtoReflect() protoreflect.Message
- func (x *NodeResp) Reset()
- func (x *NodeResp) String() string
- type NodesReq
- type QueryReq
- type RemoveResp
- func (*RemoveResp) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveResp) GetError() string
- func (x *RemoveResp) GetSuccess() bool
- func (x *RemoveResp) GetUid() string
- func (*RemoveResp) ProtoMessage()
- func (x *RemoveResp) ProtoReflect() protoreflect.Message
- func (x *RemoveResp) Reset()
- func (x *RemoveResp) String() string
- type StatsReq
- type StatsResp
- func (*StatsResp) Descriptor() ([]byte, []int)deprecated
- func (x *StatsResp) GetEdgeCount() int32
- func (x *StatsResp) GetNodeCount() int32
- func (x *StatsResp) GetNumCpu() int32
- func (x *StatsResp) GetNumGoroutines() int32
- func (x *StatsResp) GetStartTime() string
- func (x *StatsResp) GetTotalMemoryAlloc() int32
- func (*StatsResp) ProtoMessage()
- func (x *StatsResp) ProtoReflect() protoreflect.Message
- func (x *StatsResp) Reset()
- func (x *StatsResp) String() string
- type UIDReq
Constants ¶
This section is empty.
Variables ¶
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func NewGraphEndpoints ¶
func RegisterGraphHandler ¶
func RegisterGraphHandler(s server.Server, hdlr GraphHandler, opts ...server.HandlerOption) error
Types ¶
type DumpReq ¶
type DumpReq struct {
// Starting node for a subgraph. If omitted then the entire graph is dumped.
NodeUid string `protobuf:"bytes,1,opt,name=node_uid,json=nodeUid,proto3" json:"node_uid,omitempty"`
// How many levels to return. If omitted then the no limit is applied.
Levels int32 `protobuf:"varint,2,opt,name=levels,proto3" json:"levels,omitempty"`
// contains filtered or unexported fields
}
DumpReq is a request to producting a graph dump.
func (*DumpReq) Descriptor
deprecated
func (*DumpReq) GetNodeUid ¶
func (*DumpReq) ProtoMessage ¶
func (*DumpReq) ProtoMessage()
func (*DumpReq) ProtoReflect ¶
func (x *DumpReq) ProtoReflect() protoreflect.Message
type DumpResp ¶
type DumpResp struct {
Nodes []*NodeResp `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
Edges []*EdgeResp `protobuf:"bytes,2,rep,name=edges,proto3" json:"edges,omitempty"`
// contains filtered or unexported fields
}
DumpResp is a graph dump response.
func (*DumpResp) Descriptor
deprecated
func (*DumpResp) ProtoMessage ¶
func (*DumpResp) ProtoMessage()
func (*DumpResp) ProtoReflect ¶
func (x *DumpResp) ProtoReflect() protoreflect.Message
type EdgeReq ¶
type EdgeReq struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
SourceUid string `protobuf:"bytes,3,opt,name=source_uid,json=sourceUid,proto3" json:"source_uid,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
TargetUid string `protobuf:"bytes,4,opt,name=target_uid,json=targetUid,proto3" json:"target_uid,omitempty"`
Properties map[string][]byte `` /* 161-byte string literal not displayed */
// contains filtered or unexported fields
}
EdgeReq is a edge request.
func (*EdgeReq) Descriptor
deprecated
func (*EdgeReq) GetProperties ¶
func (*EdgeReq) GetSourceUid ¶
func (*EdgeReq) GetTargetUid ¶
func (*EdgeReq) ProtoMessage ¶
func (*EdgeReq) ProtoMessage()
func (*EdgeReq) ProtoReflect ¶
func (x *EdgeReq) ProtoReflect() protoreflect.Message
type EdgeResp ¶
type EdgeResp struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
SourceUid string `protobuf:"bytes,3,opt,name=source_uid,json=sourceUid,proto3" json:"source_uid,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
TargetUid string `protobuf:"bytes,4,opt,name=target_uid,json=targetUid,proto3" json:"target_uid,omitempty"`
Properties map[string][]byte `` /* 161-byte string literal not displayed */
// contains filtered or unexported fields
}
EdgeResp is a edge response.
func (*EdgeResp) Descriptor
deprecated
func (*EdgeResp) GetProperties ¶
func (*EdgeResp) GetSourceUid ¶
func (*EdgeResp) GetTargetUid ¶
func (*EdgeResp) ProtoMessage ¶
func (*EdgeResp) ProtoMessage()
func (*EdgeResp) ProtoReflect ¶
func (x *EdgeResp) ProtoReflect() protoreflect.Message
type EdgesReq ¶
type EdgesReq struct {
SourceUid string `protobuf:"bytes,1,opt,name=source_uid,json=sourceUid,proto3" json:"source_uid,omitempty"`
Label []string `protobuf:"bytes,2,rep,name=label,proto3" json:"label,omitempty"`
TargetUid string `protobuf:"bytes,3,opt,name=target_uid,json=targetUid,proto3" json:"target_uid,omitempty"`
Properties map[string][]byte `` /* 161-byte string literal not displayed */
// contains filtered or unexported fields
}
EdgesReq used for returning all the edges in the graph. Omitting the label or properties will return everything. Use Label to filter for nodes matching a label. Use Properties to filter for nodes containing a property.
func (*EdgesReq) Descriptor
deprecated
func (*EdgesReq) GetProperties ¶
func (*EdgesReq) GetSourceUid ¶
func (*EdgesReq) GetTargetUid ¶
func (*EdgesReq) ProtoMessage ¶
func (*EdgesReq) ProtoMessage()
func (*EdgesReq) ProtoReflect ¶
func (x *EdgesReq) ProtoReflect() protoreflect.Message
type GraphHandler ¶
type GraphHandler interface {
// AddNode adds a node to the graph.
AddNode(context.Context, *NodeReq, *NodeResp) error
// RemoveNode remove a node from the graph.
RemoveNode(context.Context, *UIDReq, *RemoveResp) error
// Node returns the node if found.
Node(context.Context, *NodeReq, *NodeResp) error
// Nodes returns all the node in the graph.
Nodes(context.Context, *NodesReq, Graph_NodesStream) error
// AddEdge adds a edge to the graph.
AddEdge(context.Context, *EdgeReq, *EdgeResp) error
// RemoveEdge remove a edge from the graph.
RemoveEdge(context.Context, *UIDReq, *RemoveResp) error
// Edge returns the edge if found.
Edge(context.Context, *EdgeReq, *EdgeResp) error
// Edges returns all the edges in the graph.
Edges(context.Context, *EdgesReq, Graph_EdgesStream) error
// Stats returns some stats about the service.
Stats(context.Context, *StatsReq, *StatsResp) error
// Query sends a query to the graph and returns a dump
// with the query results.
Query(context.Context, *QueryReq, *DumpResp) error
// Dump the graph.
Dump(context.Context, *DumpReq, *DumpResp) error
}
type GraphService ¶
type GraphService interface {
// AddNode adds a node to the graph.
AddNode(ctx context.Context, in *NodeReq, opts ...client.CallOption) (*NodeResp, error)
// RemoveNode remove a node from the graph.
RemoveNode(ctx context.Context, in *UIDReq, opts ...client.CallOption) (*RemoveResp, error)
// Node returns the node if found.
Node(ctx context.Context, in *NodeReq, opts ...client.CallOption) (*NodeResp, error)
// Nodes returns all the node in the graph.
Nodes(ctx context.Context, in *NodesReq, opts ...client.CallOption) (Graph_NodesService, error)
// AddEdge adds a edge to the graph.
AddEdge(ctx context.Context, in *EdgeReq, opts ...client.CallOption) (*EdgeResp, error)
// RemoveEdge remove a edge from the graph.
RemoveEdge(ctx context.Context, in *UIDReq, opts ...client.CallOption) (*RemoveResp, error)
// Edge returns the edge if found.
Edge(ctx context.Context, in *EdgeReq, opts ...client.CallOption) (*EdgeResp, error)
// Edges returns all the edges in the graph.
Edges(ctx context.Context, in *EdgesReq, opts ...client.CallOption) (Graph_EdgesService, error)
// Stats returns some stats about the service.
Stats(ctx context.Context, in *StatsReq, opts ...client.CallOption) (*StatsResp, error)
// Query sends a query to the graph and returns a dump
// with the query results.
Query(ctx context.Context, in *QueryReq, opts ...client.CallOption) (*DumpResp, error)
// Dump the graph.
Dump(ctx context.Context, in *DumpReq, opts ...client.CallOption) (*DumpResp, error)
}
func NewGraphService ¶
func NewGraphService(name string, c client.Client) GraphService
type Graph_EdgesService ¶
type Graph_EdgesStream ¶
type Graph_NodesService ¶
type Graph_NodesStream ¶
type NodeReq ¶
type NodeReq struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Properties map[string][]byte `` /* 161-byte string literal not displayed */
// contains filtered or unexported fields
}
NodeReq is a node request.
func (*NodeReq) Descriptor
deprecated
func (*NodeReq) GetProperties ¶
func (*NodeReq) ProtoMessage ¶
func (*NodeReq) ProtoMessage()
func (*NodeReq) ProtoReflect ¶
func (x *NodeReq) ProtoReflect() protoreflect.Message
type NodeResp ¶
type NodeResp struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Properties map[string][]byte `` /* 161-byte string literal not displayed */
InEdges []string `protobuf:"bytes,4,rep,name=in_edges,json=inEdges,proto3" json:"in_edges,omitempty"`
OutEdges []string `protobuf:"bytes,5,rep,name=out_edges,json=outEdges,proto3" json:"out_edges,omitempty"`
// contains filtered or unexported fields
}
NodeResp is a node response.
func (*NodeResp) Descriptor
deprecated
func (*NodeResp) GetInEdges ¶
func (*NodeResp) GetOutEdges ¶
func (*NodeResp) GetProperties ¶
func (*NodeResp) ProtoMessage ¶
func (*NodeResp) ProtoMessage()
func (*NodeResp) ProtoReflect ¶
func (x *NodeResp) ProtoReflect() protoreflect.Message
type NodesReq ¶
type NodesReq struct {
Label []string `protobuf:"bytes,1,rep,name=label,proto3" json:"label,omitempty"`
Properties map[string][]byte `` /* 161-byte string literal not displayed */
// contains filtered or unexported fields
}
NodesReq used for returning all the nodes in the graph. Omitting the label or properties will return everything. Use Label to filter for nodes matching a label. Use Properties to filter for nodes containing a property.
func (*NodesReq) Descriptor
deprecated
func (*NodesReq) GetProperties ¶
func (*NodesReq) ProtoMessage ¶
func (*NodesReq) ProtoMessage()
func (*NodesReq) ProtoReflect ¶
func (x *NodesReq) ProtoReflect() protoreflect.Message
type QueryReq ¶
type QueryReq struct {
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
// contains filtered or unexported fields
}
QueryReq is query request.
func (*QueryReq) Descriptor
deprecated
func (*QueryReq) ProtoMessage ¶
func (*QueryReq) ProtoMessage()
func (*QueryReq) ProtoReflect ¶
func (x *QueryReq) ProtoReflect() protoreflect.Message
type RemoveResp ¶
type RemoveResp struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
RemoveResp is a response when removing a item from the graph.
func (*RemoveResp) Descriptor
deprecated
func (*RemoveResp) Descriptor() ([]byte, []int)
Deprecated: Use RemoveResp.ProtoReflect.Descriptor instead.
func (*RemoveResp) GetError ¶
func (x *RemoveResp) GetError() string
func (*RemoveResp) GetSuccess ¶
func (x *RemoveResp) GetSuccess() bool
func (*RemoveResp) GetUid ¶
func (x *RemoveResp) GetUid() string
func (*RemoveResp) ProtoMessage ¶
func (*RemoveResp) ProtoMessage()
func (*RemoveResp) ProtoReflect ¶
func (x *RemoveResp) ProtoReflect() protoreflect.Message
func (*RemoveResp) Reset ¶
func (x *RemoveResp) Reset()
func (*RemoveResp) String ¶
func (x *RemoveResp) String() string
type StatsReq ¶
type StatsReq struct {
// contains filtered or unexported fields
}
StatsReq is a stats message containing inforamtion about the service.
func (*StatsReq) Descriptor
deprecated
func (*StatsReq) ProtoMessage ¶
func (*StatsReq) ProtoMessage()
func (*StatsReq) ProtoReflect ¶
func (x *StatsReq) ProtoReflect() protoreflect.Message
type StatsResp ¶
type StatsResp struct {
// start time in UTC when the instance started.
StartTime string `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// number of CPUS available.
NumCpu int32 `protobuf:"varint,2,opt,name=num_cpu,json=numCpu,proto3" json:"num_cpu,omitempty"`
// number of goroutings running.
NumGoroutines int32 `protobuf:"varint,3,opt,name=num_goroutines,json=numGoroutines,proto3" json:"num_goroutines,omitempty"`
// number of nodes in the graph.
NodeCount int32 `protobuf:"varint,4,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"`
// number of edges in the graph.
EdgeCount int32 `protobuf:"varint,5,opt,name=edge_count,json=edgeCount,proto3" json:"edge_count,omitempty"`
// total memory allocated in bytes.
TotalMemoryAlloc int32 `protobuf:"varint,6,opt,name=total_memory_alloc,json=totalMemoryAlloc,proto3" json:"total_memory_alloc,omitempty"`
// contains filtered or unexported fields
}
StatsResp is the stats response with information about the service.
func (*StatsResp) Descriptor
deprecated
func (*StatsResp) GetEdgeCount ¶
func (*StatsResp) GetNodeCount ¶
func (*StatsResp) GetNumGoroutines ¶
func (*StatsResp) GetStartTime ¶
func (*StatsResp) GetTotalMemoryAlloc ¶
func (*StatsResp) ProtoMessage ¶
func (*StatsResp) ProtoMessage()
func (*StatsResp) ProtoReflect ¶
func (x *StatsResp) ProtoReflect() protoreflect.Message
type UIDReq ¶
type UIDReq struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
// contains filtered or unexported fields
}
UIDReq is a request used for searching the graph for a node/edge which contains the uid.
func (*UIDReq) Descriptor
deprecated
func (*UIDReq) ProtoMessage ¶
func (*UIDReq) ProtoMessage()
func (*UIDReq) ProtoReflect ¶
func (x *UIDReq) ProtoReflect() protoreflect.Message