grpcclient

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Errors int
	ID     string
	Client client.ClientClient

	Addr string
	// contains filtered or unexported fields
}

Node represents the API to a single FReD Node

func NewNode

func NewNode(addr string, port int, id string, certFile string, keyFile string, caFile string) *Node

NewNode creates a new Node that represents a connection to a single fred instance

func (*Node) AddKeygroupReplica

func (n *Node) AddKeygroupReplica(kgname, replicaNodeID string, expiry int, expectError bool)

AddKeygroupReplica calls the AddKeygroupReplica endpoint of the GRPC interface.

func (*Node) AddKeygroupTrigger

func (n *Node) AddKeygroupTrigger(kgname, triggerNodeID, triggerNodeHost string, expectError bool)

AddKeygroupTrigger calls the AddKeygroupTrigger endpoint of the GRPC interface.

func (*Node) AddUser

func (n *Node) AddUser(user string, kgname string, role string, expectError bool)

AddUser calls the AddUser endpoint of the GRPC interface.

func (*Node) AppendItem

func (n *Node) AppendItem(kgname string, id uint64, data string, expectError bool) string

AppendItem calls the AppendItem endpoint of the GRPC interface.

func (*Node) Close

func (n *Node) Close()

Close closes the connection

func (*Node) CreateKeygroup

func (n *Node) CreateKeygroup(kgname string, mutable bool, expiry int, expectError bool)

CreateKeygroup calls the CreateKeygroup endpoint of the GRPC interface.

func (*Node) DeleteItem

func (n *Node) DeleteItem(kgname, item string, expectError bool)

DeleteItem calls the DeleteItem endpoint of the GRPC interface.

func (*Node) DeleteItemVersion added in v0.2.1

func (n *Node) DeleteItemVersion(kgname, item string, version vclock.VClock, expectError bool) vclock.VClock

DeleteItemVersion calls the DeleteItem endpoint of the GRPC interface with a version.

func (*Node) DeleteKeygroup

func (n *Node) DeleteKeygroup(kgname string, expectError bool)

DeleteKeygroup calls the DeleteKeygroup endpoint of the GRPC interface.

func (*Node) DeleteKeygroupReplica

func (n *Node) DeleteKeygroupReplica(kgname, replicaNodeID string, expectError bool)

DeleteKeygroupReplica calls the DeleteKeygroupReplica endpoint of the GRPC interface.

func (*Node) DeleteKeygroupTrigger

func (n *Node) DeleteKeygroupTrigger(kgname, triggerNodeID string, expectError bool)

DeleteKeygroupTrigger calls the DeleteKeygroupTrigger endpoint of the GRPC interface.

func (*Node) GetAllReplica

func (n *Node) GetAllReplica(expectError bool) map[string]string

GetAllReplica calls the GetAllReplica endpoint of the GRPC interface.

func (*Node) GetItem

func (n *Node) GetItem(kgname, item string, expectError bool) ([]string, []vclock.VClock)

GetItem calls the GetItem endpoint of the GRPC interface.

func (*Node) GetKeygroupInfo added in v0.2.2

func (n *Node) GetKeygroupInfo(kgname string, expectError bool) (bool, map[string]int)

GetKeygroupInfo calls the GetKeygroupInfo endpoint of the GRPC interface.

func (*Node) GetKeygroupTriggers

func (n *Node) GetKeygroupTriggers(kgname string, expectError bool) []*client.Trigger

GetKeygroupTriggers calls the GetKeygroupTriggers endpoint of the GRPC interface.

func (*Node) GetReplica

func (n *Node) GetReplica(nodeID string, expectError bool) (string, string)

GetReplica calls the GetReplica endpoint of the GRPC interface.

func (*Node) PutItem

func (n *Node) PutItem(kgname, item string, data string, expectError bool) vclock.VClock

PutItem calls the PutItem endpoint of the GRPC interface.

func (*Node) PutItemVersion added in v0.2.1

func (n *Node) PutItemVersion(kgname, item string, data string, version vclock.VClock, expectError bool) vclock.VClock

PutItemVersion calls the PutItem endpoint of the GRPC interface with a version.

func (*Node) RemoveUser

func (n *Node) RemoveUser(user string, kgname string, role string, expectError bool)

RemoveUser calls the RemoveUser endpoint of the GRPC interface.

func (*Node) ScanItems

func (n *Node) ScanItems(kgname, item string, count uint64, expectError bool) map[string]string

ScanItems calls the Scan endpoint of the GRPC interface.

func (*Node) ScanKeys added in v0.2.19

func (n *Node) ScanKeys(kgname, item string, count uint64, expectError bool) []string

ScanKeys calls the Keys endpoint of the GRPC interface.

Jump to

Keyboard shortcuts

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