gripper

package
v0.0.0-...-fa720cf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 34 Imported by: 3

README

GRIPPER

GRIP Plugin External Resources

GRIP Plugin External Resources (GRIPPERs) are GRIP drivers that take external resources and allow GRIP to access them are part of a unified graph. To integrate new resources into the graph, you first deploy griper proxies that plug into the external resources. They are unique and configured to access specific resources. These provide a view into external resources as a series of document collections. For example, an SQL gripper would plug into an SQL server and provide the tables as a set of collections with each every row a document. A gripper is written as a gRPC server.

GIPPER Architecture

GRIPPER versioning

The Plugin External Resource (PER) is version Alpha 1. As an alpha system, the plugin interface works, but the API will change and there is no expectation of continued support for older alpha APIs.

GRIPPER proxy

With the external resources normalized to a single data model, the graph model describes how to connect the set of collections into a graph model. Each GRIPPER is required to provide a GRPC interface that allows access to collections stored in the resource.

The required functions include:

rpc GetCollections(Empty) returns (stream Collection);

GetCollections returns a list of all of the Collections accessible via this server.

rpc GetCollectionInfo(Collection) returns (CollectionInfo);

GetCollectionInfo provides information, such as the list of indexed fields, in a collection.

rpc GetIDs(Collection) returns (stream RowID);

GetIDs returns a stream of all of the IDs found in a collection.

rpc GetRows(Collection) returns (stream Row);

GetRows returns a stream of all of the rows in a collection.

rpc GetRowsByID(stream RowRequest) returns (stream Row);

GetRowsByID accepts a stream of row requests, each one requesting a single row by it's id, and then returns a stream of results.

rpc GetRowsByField(FieldRequest) returns (stream Row);

GetRowsByField searches a collection, looking for values found in an indexed field.

Graph Model

The graph model describes how GRIP will access multiple gripper servers. The graph is described using three sections, sources, vertices and edges.

The sources section describes all of the GRIPPER resources that GRIP will use to build the graph. The vertices section describes how different collections found in these sources will be turned into Vertex found in the graph. Finally, the edges section describes the different kinds of rules that can be used build the edges in the graph.

Edges can be built from two rules fieldToField and edgeTable. In fieldToField, a field value found in one vertex can be used to look up matching destination vertices by using an indexed field found in another collection that has been mapped to a vertex. For edgeTable connections, there is a single collection that represents a connection between two other collections that have been mapped to vertices.

Example:

sources:
  tableServer:
    host: localhost:50051

vertices:
  "Character:" :
    source: tableServer
    label: Character
    collection: Character

  "Planet:" :
    source: tableServer
    label: Planet
    collection: Planet

  "Film:" :
    source: tableServer
    label: Film
    collection: Film

  "Species:" :
    source: tableServer
    label: Species
    collection: Species

  "Starship:" :
    source: tableServer
    label: Starship
    collection: Starship

  "Vehicle:" :
    source: tableServer
    label: Vehicle
    collection: Vehicle

edges:
  homeworld:
    fromVertex: "Character:"
    toVertex: "Planet:"
    label: homeworld
    fieldToField:
      fromField: $.homeworld
      toField: $.id

  species:
    fromVertex: "Character:"
    toVertex: "Species:"
    label: species
    fieldToField:
      fromField: $.species
      toField: $.id

  people:
    fromVertex: "Species:"
    toVertex: "Character:"
    label: people
    edgeTable:
      source: tableServer
      collection: speciesCharacter
      fromField: $.from
      toField: $.to


  residents:
    fromVertex: "Planet:"
    toVertex: "Character:"
    label: residents
    edgeTable:
      source: tableServer
      collection: planetCharacter
      fromField: $.from
      toField: $.to

  filmVehicles:
    fromVertex: "Film:"
    toVertex: "Vehicle:"
    label: "vehicles"
    edgeTable:
      source: tableServer
      collection: filmVehicles
      fromField: "$.from"
      toField: "$.to"

  vehicleFilms:
    toVertex: "Film:"
    fromVertex: "Vehicle:"
    label: "films"
    edgeTable:
      source: tableServer
      collection: filmVehicles
      toField: "$.from"
      fromField: "$.to"

  filmStarships:
    fromVertex: "Film:"
    toVertex: "Starship:"
    label: "starships"
    edgeTable:
      source: tableServer
      collection: filmStarships
      fromField: "$.from"
      toField: "$.to"

  starshipFilms:
    toVertex: "Film:"
    fromVertex: "Starship:"
    label: "films"
    edgeTable:
      source: tableServer
      collection: filmStarships
      toField: "$.from"
      fromField: "$.to"

  filmPlanets:
    fromVertex: "Film:"
    toVertex: "Planet:"
    label: "planets"
    edgeTable:
      source: tableServer
      collection: filmPlanets
      fromField: "$.from"
      toField: "$.to"

  planetFilms:
    toVertex: "Film:"
    fromVertex: "Planet:"
    label: "films"
    edgeTable:
      source: tableServer
      collection: filmPlanets
      toField: "$.from"
      fromField: "$.to"

  filmSpecies:
    fromVertex: "Film:"
    toVertex: "Species:"
    label: "species"
    edgeTable:
      source: tableServer
      collection: filmSpecies
      fromField: "$.from"
      toField: "$.to"

  speciesFilms:
    toVertex: "Film:"
    fromVertex: "Species:"
    label: "films"
    edgeTable:
      source: tableServer
      collection: filmSpecies
      toField: "$.from"
      fromField: "$.to"

  filmCharacters:
    fromVertex: "Film:"
    toVertex: "Character:"
    label: characters
    edgeTable:
      source: tableServer
      collection: filmCharacters
      fromField: "$.from"
      toField: "$.to"

  characterFilms:
    fromVertex: "Character:"
    toVertex: "Film:"
    label: films
    edgeTable:
      source: tableServer
      collection: filmCharacters
      toField: "$.from"
      fromField: "$.to"

  characterStarships:
    fromVertex: "Character:"
    toVertex: "Starship:"
    label: "starships"
    edgeTable:
      source: tableServer
      collection: characterStarships
      fromField: "$.from"
      toField: "$.to"

  starshipCharacters:
    toVertex: "Character:"
    fromVertex: "Starship:"
    label: "pilots"
    edgeTable:
      source: tableServer
      collection: characterStarships
      toField: "$.from"
      fromField: "$.to"

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_gripper_proto protoreflect.FileDescriptor
View Source
var GRIPSource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gripper.GRIPSource",
	HandlerType: (*GRIPSourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCollectionInfo",
			Handler:    _GRIPSource_GetCollectionInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetCollections",
			Handler:       _GRIPSource_GetCollections_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetIDs",
			Handler:       _GRIPSource_GetIDs_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetRows",
			Handler:       _GRIPSource_GetRows_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetRowsByID",
			Handler:       _GRIPSource_GetRowsByID_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "GetRowsByField",
			Handler:       _GRIPSource_GetRowsByField_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "gripper.proto",
}

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

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "GRIP_PLUGIN_EXTERNAL_RESOURCE",
	MagicCookieValue: "gripper",
}
View Source
var PluginMap = map[string]plugin.Plugin{
	"gripper": &GripPlugin{},
}
View Source
var QueueSize = 50

Functions

func LaunchPluginClient

func LaunchPluginClient(plugindir string, name string, workdir string, params map[string]string) (*plugin.Client, error)

func NewQueue

func NewQueue(path string) (chan<- interface{}, <-chan interface{})

func ParseConfig

func ParseConfig(raw []byte, conf *GraphConfig) error

Parse parses a YAML doc into the given Config instance.

func RegisterGRIPSourceServer

func RegisterGRIPSourceServer(s grpc.ServiceRegistrar, srv GRIPSourceServer)

func StartServer

func StartServer(port int, serv GRIPSourceServer)

func TabularOptimizer

func TabularOptimizer(pipe []*gripql.GraphStatement) []*gripql.GraphStatement

Types

type BaseRow

type BaseRow struct {
	Key   string
	Value map[string]interface{}
}

type ChannelMux

type ChannelMux struct {
	// contains filtered or unexported fields
}

func NewChannelMux

func NewChannelMux() *ChannelMux

func (*ChannelMux) AddPipeline

func (m *ChannelMux) AddPipeline(input chan<- interface{}, output <-chan interface{}) (int, error)

func (*ChannelMux) Close

func (m *ChannelMux) Close()

func (*ChannelMux) GetOutChannel

func (m *ChannelMux) GetOutChannel() <-chan interface{}

func (*ChannelMux) Put

func (m *ChannelMux) Put(num int, d interface{})

type Collection

type Collection struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Collection) Descriptor deprecated

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

Deprecated: Use Collection.ProtoReflect.Descriptor instead.

func (*Collection) GetName

func (x *Collection) GetName() string

func (*Collection) ProtoMessage

func (*Collection) ProtoMessage()

func (*Collection) ProtoReflect

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

func (*Collection) Reset

func (x *Collection) Reset()

func (*Collection) String

func (x *Collection) String() string

type CollectionInfo

type CollectionInfo struct {
	SearchFields []string          `protobuf:"bytes,1,rep,name=search_fields,json=searchFields,proto3" json:"search_fields,omitempty"`
	LinkMap      map[string]string `` // Map field name to collection name
	/* 170-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CollectionInfo) Descriptor deprecated

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

Deprecated: Use CollectionInfo.ProtoReflect.Descriptor instead.

func (*CollectionInfo) GetLinkMap

func (x *CollectionInfo) GetLinkMap() map[string]string

func (*CollectionInfo) GetSearchFields

func (x *CollectionInfo) GetSearchFields() []string

func (*CollectionInfo) ProtoMessage

func (*CollectionInfo) ProtoMessage()

func (*CollectionInfo) ProtoReflect

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

func (*CollectionInfo) Reset

func (x *CollectionInfo) Reset()

func (*CollectionInfo) String

func (x *CollectionInfo) String() string

type Config

type Config struct {
	Graph       string
	MappingFile string
	Mapping     *GraphConfig
}

Config is the component in the global GRIP config file

type Driver

type Driver interface {
	GetTimeout() int
	GetFields() ([]string, error)
	GetFieldLinks() (map[string]string, error)
	FetchRow(string) (*BaseRow, error)
	FetchRows(context.Context) (chan *BaseRow, error)
	FetchMatchRows(context.Context, string, string) (chan *BaseRow, error)
}

type DriverCache

type DriverCache struct {
	Driver Driver
	// contains filtered or unexported fields
}

func NewDriverCache

func NewDriverCache(dr Driver) *DriverCache

func (*DriverCache) FetchMatchRows

func (dc *DriverCache) FetchMatchRows(ctx context.Context, field string, value string) (chan *BaseRow, error)

func (*DriverCache) FetchRow

func (dc *DriverCache) FetchRow(id string) (*BaseRow, error)

func (*DriverCache) FetchRows

func (dc *DriverCache) FetchRows(ctx context.Context) (chan *BaseRow, error)

func (*DriverCache) GetFields

func (dc *DriverCache) GetFields() ([]string, error)

func (*DriverCache) GetTimeout

func (dc *DriverCache) GetTimeout() int

type DriverPreLoad

type DriverPreLoad struct {
	// contains filtered or unexported fields
}

func NewDriverPreload

func NewDriverPreload(data map[string]*BaseRow, fieldLinks map[string]string) *DriverPreLoad

func (*DriverPreLoad) FetchMatchRows

func (dp *DriverPreLoad) FetchMatchRows(ctx context.Context, field string, value string) (chan *BaseRow, error)

func (*DriverPreLoad) FetchRow

func (dp *DriverPreLoad) FetchRow(id string) (*BaseRow, error)

func (*DriverPreLoad) FetchRows

func (dp *DriverPreLoad) FetchRows(ctx context.Context) (chan *BaseRow, error)
func (dp *DriverPreLoad) GetFieldLinks() (map[string]string, error)

func (*DriverPreLoad) GetFields

func (dp *DriverPreLoad) GetFields() ([]string, error)

func (*DriverPreLoad) GetTimeout

func (dp *DriverPreLoad) GetTimeout() int

type EdgeConfig

type EdgeConfig struct {
	Gid   string        `json:"gid"`
	To    string        `json:"to"`
	From  string        `json:"from"`
	Label string        `json:"label"`
	Data  ElementConfig `json:"data"`
}

type EdgeSource

type EdgeSource struct {
	// contains filtered or unexported fields
}

func (*EdgeSource) GenID

func (es *EdgeSource) GenID(srcID, dstID string) string

type ElementConfig

type ElementConfig struct {
	Source     string `json:"source"`
	Collection string `json:"collection"`
	FromField  string `json:"fromField"`
	ToField    string `json:"toField"`
}

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type FieldRequest

type FieldRequest struct {
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	Field      string `protobuf:"bytes,2,opt,name=field,proto3" json:"field,omitempty"`
	Value      string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*FieldRequest) Descriptor deprecated

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

Deprecated: Use FieldRequest.ProtoReflect.Descriptor instead.

func (*FieldRequest) GetCollection

func (x *FieldRequest) GetCollection() string

func (*FieldRequest) GetField

func (x *FieldRequest) GetField() string

func (*FieldRequest) GetValue

func (x *FieldRequest) GetValue() string

func (*FieldRequest) ProtoMessage

func (*FieldRequest) ProtoMessage()

func (*FieldRequest) ProtoReflect

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

func (*FieldRequest) Reset

func (x *FieldRequest) Reset()

func (*FieldRequest) String

func (x *FieldRequest) String() string

type GRIPSourceClient

type GRIPSourceClient interface {
	GetCollections(ctx context.Context, in *Empty, opts ...grpc.CallOption) (GRIPSource_GetCollectionsClient, error)
	GetCollectionInfo(ctx context.Context, in *Collection, opts ...grpc.CallOption) (*CollectionInfo, error)
	GetIDs(ctx context.Context, in *Collection, opts ...grpc.CallOption) (GRIPSource_GetIDsClient, error)
	GetRows(ctx context.Context, in *Collection, opts ...grpc.CallOption) (GRIPSource_GetRowsClient, error)
	GetRowsByID(ctx context.Context, opts ...grpc.CallOption) (GRIPSource_GetRowsByIDClient, error)
	GetRowsByField(ctx context.Context, in *FieldRequest, opts ...grpc.CallOption) (GRIPSource_GetRowsByFieldClient, error)
}

GRIPSourceClient is the client API for GRIPSource 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 GetSourceInterface

func GetSourceInterface(client *plugin.Client) (GRIPSourceClient, error)

func NewGRIPSourceClient

func NewGRIPSourceClient(cc grpc.ClientConnInterface) GRIPSourceClient

func StartConnection

func StartConnection(host string) (GRIPSourceClient, error)

type GRIPSourceServer

type GRIPSourceServer interface {
	GetCollections(*Empty, GRIPSource_GetCollectionsServer) error
	GetCollectionInfo(context.Context, *Collection) (*CollectionInfo, error)
	GetIDs(*Collection, GRIPSource_GetIDsServer) error
	GetRows(*Collection, GRIPSource_GetRowsServer) error
	GetRowsByID(GRIPSource_GetRowsByIDServer) error
	GetRowsByField(*FieldRequest, GRIPSource_GetRowsByFieldServer) error
	// contains filtered or unexported methods
}

GRIPSourceServer is the server API for GRIPSource service. All implementations must embed UnimplementedGRIPSourceServer for forward compatibility

type GRIPSource_GetCollectionsClient

type GRIPSource_GetCollectionsClient interface {
	Recv() (*Collection, error)
	grpc.ClientStream
}

type GRIPSource_GetCollectionsServer

type GRIPSource_GetCollectionsServer interface {
	Send(*Collection) error
	grpc.ServerStream
}

type GRIPSource_GetIDsClient

type GRIPSource_GetIDsClient interface {
	Recv() (*RowID, error)
	grpc.ClientStream
}

type GRIPSource_GetIDsServer

type GRIPSource_GetIDsServer interface {
	Send(*RowID) error
	grpc.ServerStream
}

type GRIPSource_GetRowsByFieldClient

type GRIPSource_GetRowsByFieldClient interface {
	Recv() (*Row, error)
	grpc.ClientStream
}

type GRIPSource_GetRowsByFieldServer

type GRIPSource_GetRowsByFieldServer interface {
	Send(*Row) error
	grpc.ServerStream
}

type GRIPSource_GetRowsByIDClient

type GRIPSource_GetRowsByIDClient interface {
	Send(*RowRequest) error
	Recv() (*Row, error)
	grpc.ClientStream
}

type GRIPSource_GetRowsByIDServer

type GRIPSource_GetRowsByIDServer interface {
	Send(*Row) error
	Recv() (*RowRequest, error)
	grpc.ServerStream
}

type GRIPSource_GetRowsClient

type GRIPSource_GetRowsClient interface {
	Recv() (*Row, error)
	grpc.ClientStream
}

type GRIPSource_GetRowsServer

type GRIPSource_GetRowsServer interface {
	Send(*Row) error
	grpc.ServerStream
}

type GraphConfig

type GraphConfig struct {
	Vertices map[string]VertexConfig `json:"vertices"`
	Edges    map[string]EdgeConfig   `json:"edges"`
}

func GraphToConfig

func GraphToConfig(graph *gripql.Graph) (*GraphConfig, error)

func LoadConfig

func LoadConfig(path string) (*GraphConfig, error)

type GripPlugin

type GripPlugin struct {
	plugin.Plugin
	Impl GRIPSourceServer
}

func (*GripPlugin) GRPCClient

func (p *GripPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*GripPlugin) GRPCServer

func (p *GripPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type GripperClient

type GripperClient struct {
	// contains filtered or unexported fields
}

GripperClient manages the multiple connections to named Dig sources

func NewGripperClient

func NewGripperClient(clients map[string]GRIPSourceClient) *GripperClient

func (*GripperClient) GetCollectionInfo

func (m *GripperClient) GetCollectionInfo(ctx context.Context, source string, collection string) (*CollectionInfo, error)

func (*GripperClient) GetCollections

func (m *GripperClient) GetCollections(ctx context.Context, source string) chan string

func (*GripperClient) GetIDs

func (m *GripperClient) GetIDs(ctx context.Context, source string, collection string) chan string

func (*GripperClient) GetRows

func (m *GripperClient) GetRows(ctx context.Context, source string, collection string) chan *Row

func (*GripperClient) GetRowsByField

func (m *GripperClient) GetRowsByField(ctx context.Context, source string, collection string, field string, value string) (chan *Row, error)

func (*GripperClient) GetRowsByID

func (m *GripperClient) GetRowsByID(ctx context.Context, source string, collection string, reqChan chan *RowRequest) (chan *Row, error)

type Row

type Row struct {
	Id        string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data      *structpb.Struct `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	RequestID uint64           `protobuf:"varint,3,opt,name=requestID,proto3" json:"requestID,omitempty"`
	// contains filtered or unexported fields
}

func (*Row) Descriptor deprecated

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

Deprecated: Use Row.ProtoReflect.Descriptor instead.

func (*Row) GetData

func (x *Row) GetData() *structpb.Struct

func (*Row) GetId

func (x *Row) GetId() string

func (*Row) GetRequestID

func (x *Row) GetRequestID() uint64

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) ProtoReflect

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

func (*Row) Reset

func (x *Row) Reset()

func (*Row) String

func (x *Row) String() string

type RowID

type RowID struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*RowID) Descriptor deprecated

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

Deprecated: Use RowID.ProtoReflect.Descriptor instead.

func (*RowID) GetId

func (x *RowID) GetId() string

func (*RowID) ProtoMessage

func (*RowID) ProtoMessage()

func (*RowID) ProtoReflect

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

func (*RowID) Reset

func (x *RowID) Reset()

func (*RowID) String

func (x *RowID) String() string

type RowRequest

type RowRequest struct {
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	Id         string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	RequestID  uint64 `protobuf:"varint,3,opt,name=requestID,proto3" json:"requestID,omitempty"`
	// contains filtered or unexported fields
}

func (*RowRequest) Descriptor deprecated

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

Deprecated: Use RowRequest.ProtoReflect.Descriptor instead.

func (*RowRequest) GetCollection

func (x *RowRequest) GetCollection() string

func (*RowRequest) GetId

func (x *RowRequest) GetId() string

func (*RowRequest) GetRequestID

func (x *RowRequest) GetRequestID() uint64

func (*RowRequest) ProtoMessage

func (*RowRequest) ProtoMessage()

func (*RowRequest) ProtoReflect

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

func (*RowRequest) Reset

func (x *RowRequest) Reset()

func (*RowRequest) String

func (x *RowRequest) String() string

type SimpleTableServicer

type SimpleTableServicer struct {
	UnimplementedGRIPSourceServer
	// contains filtered or unexported fields
}

func NewSimpleTableServer

func NewSimpleTableServer(dr map[string]Driver) *SimpleTableServicer

func (*SimpleTableServicer) GetCollectionInfo

func (st *SimpleTableServicer) GetCollectionInfo(cxt context.Context, col *Collection) (*CollectionInfo, error)

func (*SimpleTableServicer) GetCollections

func (st *SimpleTableServicer) GetCollections(e *Empty, srv GRIPSource_GetCollectionsServer) error

func (*SimpleTableServicer) GetIDs

func (*SimpleTableServicer) GetRows

func (*SimpleTableServicer) GetRowsByField

func (*SimpleTableServicer) GetRowsByID

type TabularGDB

type TabularGDB struct {
	// contains filtered or unexported fields
}

func NewGDBFromConfig

func NewGDBFromConfig(name string, conf *GraphConfig, sources map[string]GRIPSourceClient) (*TabularGDB, error)

func NewGDBFromGraph

func NewGDBFromGraph(graph *gripql.Graph, sources map[string]GRIPSourceClient) (*TabularGDB, error)

func (*TabularGDB) AddGraph

func (g *TabularGDB) AddGraph(string) error

func (*TabularGDB) BuildSchema

func (g *TabularGDB) BuildSchema(ctx context.Context, graph string, sampleN uint32, random bool) (*gripql.Graph, error)

BuildSchema returns the schema of a specific graph in the database

func (*TabularGDB) Close

func (g *TabularGDB) Close() error

func (*TabularGDB) DeleteGraph

func (g *TabularGDB) DeleteGraph(string) error

func (*TabularGDB) Graph

func (g *TabularGDB) Graph(graphID string) (gdbi.GraphInterface, error)

func (*TabularGDB) ListGraphs

func (g *TabularGDB) ListGraphs() []string

type TabularGraph

type TabularGraph struct {
	// contains filtered or unexported fields
}

func NewTabularGraph

func NewTabularGraph(conf GraphConfig, sources map[string]GRIPSourceClient) (*TabularGraph, error)

func (*TabularGraph) AddEdge

func (t *TabularGraph) AddEdge(edge []*gdbi.Edge) error

func (*TabularGraph) AddVertex

func (t *TabularGraph) AddVertex(vertex []*gdbi.Vertex) error

func (*TabularGraph) AddVertexIndex

func (t *TabularGraph) AddVertexIndex(label string, field string) error

func (*TabularGraph) BulkAdd

func (t *TabularGraph) BulkAdd(stream <-chan *gdbi.GraphElement) error

func (*TabularGraph) Close

func (t *TabularGraph) Close() error

func (*TabularGraph) Compiler

func (t *TabularGraph) Compiler() gdbi.Compiler

func (*TabularGraph) DelEdge

func (t *TabularGraph) DelEdge(key string) error

func (*TabularGraph) DelVertex

func (t *TabularGraph) DelVertex(key string) error

func (*TabularGraph) DeleteVertexIndex

func (t *TabularGraph) DeleteVertexIndex(label string, field string) error

func (*TabularGraph) GetEdge

func (t *TabularGraph) GetEdge(key string, load bool) *gdbi.Edge

func (*TabularGraph) GetEdgeList

func (t *TabularGraph) GetEdgeList(ctx context.Context, load bool) <-chan *gdbi.Edge

func (*TabularGraph) GetInChannel

func (t *TabularGraph) GetInChannel(ctx context.Context, req chan gdbi.ElementLookup, load bool, emitNull bool, edgeLabels []string) chan gdbi.ElementLookup

func (*TabularGraph) GetInEdgeChannel

func (t *TabularGraph) GetInEdgeChannel(ctx context.Context, req chan gdbi.ElementLookup, load bool, emitNull bool, edgeLabels []string) chan gdbi.ElementLookup

func (*TabularGraph) GetOutChannel

func (t *TabularGraph) GetOutChannel(ctx context.Context, req chan gdbi.ElementLookup, load bool, emitNull bool, edgeLabels []string) chan gdbi.ElementLookup

func (*TabularGraph) GetOutEdgeChannel

func (t *TabularGraph) GetOutEdgeChannel(ctx context.Context, req chan gdbi.ElementLookup, load bool, emitNull bool, edgeLabels []string) chan gdbi.ElementLookup

func (*TabularGraph) GetTimestamp

func (t *TabularGraph) GetTimestamp() string

func (*TabularGraph) GetVertex

func (t *TabularGraph) GetVertex(key string, load bool) *gdbi.Vertex

func (*TabularGraph) GetVertexChannel

func (t *TabularGraph) GetVertexChannel(ctx context.Context, req chan gdbi.ElementLookup, load bool) chan gdbi.ElementLookup

func (*TabularGraph) GetVertexIndexList

func (t *TabularGraph) GetVertexIndexList() <-chan *gripql.IndexID

func (*TabularGraph) GetVertexList

func (t *TabularGraph) GetVertexList(ctx context.Context, load bool) <-chan *gdbi.Vertex

func (*TabularGraph) ListEdgeLabels

func (t *TabularGraph) ListEdgeLabels() ([]string, error)

func (*TabularGraph) ListVertexLabels

func (t *TabularGraph) ListVertexLabels() ([]string, error)

func (*TabularGraph) ParseEdge

func (t *TabularGraph) ParseEdge(gid string) (string, string, string, error)

func (*TabularGraph) VertexLabelScan

func (t *TabularGraph) VertexLabelScan(ctx context.Context, label string) chan string

type UnimplementedGRIPSourceServer

type UnimplementedGRIPSourceServer struct {
}

UnimplementedGRIPSourceServer must be embedded to have forward compatible implementations.

func (UnimplementedGRIPSourceServer) GetCollectionInfo

func (UnimplementedGRIPSourceServer) GetCollections

func (UnimplementedGRIPSourceServer) GetIDs

func (UnimplementedGRIPSourceServer) GetRows

func (UnimplementedGRIPSourceServer) GetRowsByField

func (UnimplementedGRIPSourceServer) GetRowsByID

type UnsafeGRIPSourceServer

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

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

type VertexConfig

type VertexConfig struct {
	Gid   string        `json:"gid"`
	Label string        `json:"label"`
	Data  ElementConfig `json:"data"`
}

type VertexSource

type VertexSource struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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