client

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidType = errors.New("invalid type")

Functions

This section is empty.

Types

type Lantern

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

func NewLantern

func NewLantern(hostname string, port int) (*Lantern, error)

func (*Lantern) AddEdge

func (l *Lantern) AddEdge(ctx context.Context, tail string, head string, weight float32, ttl time.Duration) error

func (*Lantern) Close

func (l *Lantern) Close() error

func (*Lantern) DeleteEdge added in v0.4.0

func (l *Lantern) DeleteEdge(ctx context.Context, tail string, head string) error

func (*Lantern) DeleteVertex added in v0.4.0

func (l *Lantern) DeleteVertex(ctx context.Context, key string) error

func (*Lantern) GetEdge

func (l *Lantern) GetEdge(ctx context.Context, tail string, head string) (float32, error)

func (*Lantern) GetVertex

func (l *Lantern) GetVertex(ctx context.Context, key string) (*Vertex, error)

func (*Lantern) Illuminate

func (l *Lantern) Illuminate(ctx context.Context, seed string, step int, k int, tfidf bool) (*model.Graph[string, *Vertex], error)

func (*Lantern) PutEdge added in v0.4.0

func (l *Lantern) PutEdge(ctx context.Context, tail string, head string, weight float32, ttl time.Duration) error

func (*Lantern) PutVertex

func (l *Lantern) PutVertex(ctx context.Context, key string, value interface{}, ttl time.Duration) error

type Vertex

type Vertex pb.Vertex

func (*Vertex) BoolValue

func (v *Vertex) BoolValue() (bool, error)

func (*Vertex) BytesValue

func (v *Vertex) BytesValue() ([]byte, error)

func (*Vertex) FloatValue

func (v *Vertex) FloatValue() (float64, error)

func (*Vertex) IntValue

func (v *Vertex) IntValue() (int, error)

func (*Vertex) IsNil

func (v *Vertex) IsNil() bool

func (*Vertex) StringValue

func (v *Vertex) StringValue() (string, error)

func (*Vertex) TimeValue

func (v *Vertex) TimeValue() (time.Time, error)

func (*Vertex) UIntValue

func (v *Vertex) UIntValue() (uint, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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