Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidObjective = errors.New("invalid objective") ErrInvalidVerb = errors.New("invalid verb") ErrNotImplemented = errors.New("not implemented") ErrGetVertex = errors.New("get vertex error") ErrGetEdge = errors.New("get edge error") ErrPutVertex = errors.New("put vertex error") ErrPutEdge = errors.New("put edge error") ErrDeleteVertex = errors.New("delete vertex error") ErrDeleteEdge = errors.New("delete edge error") ErrAddEdge = errors.New("add edge error") ErrAddDecayingEdge = errors.New("add decaying-edge error") ErrScan = errors.New("scan error") ErrCount = errors.New("count error") ErrDeletePrefix = errors.New("delete-prefix error") ErrKeys = errors.New("keys error") ErrIlluminate = errors.New("illuminate error") ErrConnection = errors.New("connection error") )
Functions ¶
func IlluminateFamilyOption ¶ added in v0.27.0
func IlluminateFamilyOption(algo string, red client.Reduction, step, k uint32, obj client.Objective, restartProb, epsilon float32) (client.IlluminateOption, bool)
IlluminateFamilyOption maps the CLI algorithm token to the typed per-family SDK option introduced by the #846 oneof redesign. Since #961 the CLI grammar exposes the traversal FAMILY (algorithm=bfs|ppr|community) and the post-traversal tree REDUCTION (reduction=none|mst|spt) as orthogonal axes — this helper owns the translation: bfs selects the BFS family (step/k become BFSOpts.Step/FanOut, red becomes the Reduction), ppr selects the PPR family (k becomes PPROpts.TopN; step and reduction have no PPR meaning and are dropped), and community selects the local community family (k becomes the max_size upper bound; red/obj drive the optional tree reduction, #845). Shared by the REPL dispatcher and the cobra `illuminate` flag path so both surfaces translate identically.
Types ¶
type CLIService ¶
type CLIService struct {
// contains filtered or unexported fields
}
func NewCLIService ¶
func NewCLIService(client *client.Lantern) *CLIService
func (*CLIService) RunArgs ¶ added in v0.16.0
func (c *CLIService) RunArgs(ctx context.Context, args []string) error
RunArgs dispatches an already-split token stream (verb + arguments) through the same grammar the REPL parses from a raw line. The one-shot verb-first CLI commands (`lantern-cli get vertex <key>`, …) call this with cobra's argv so the one-liner surface and the REPL share exactly one grammar and one dispatcher (#672).