grpcclient

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 9 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, 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) 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

GetItem calls the GetItem endpoint of the GRPC interface.

func (*Node) GetKeygroupReplica

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

GetKeygroupReplica calls the GetKeygroupReplica 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)

PutItem calls the PutItem endpoint of the GRPC interface.

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.

Jump to

Keyboard shortcuts

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