Documentation
¶
Overview ¶
Code generated by github.com/ecordell/optgen. DO NOT EDIT.
Index ¶
- func MigrateHead(ctx context.Context, out io.Writer, datastore, uri string) error
- type Cluster
- type Node
- type NodeOption
- func WithCancel(cancel context.CancelFunc) NodeOption
- func WithDBName(dBName string) NodeOption
- func WithDatastore(datastore string) NodeOption
- func WithDispatchPort(dispatchPort int) NodeOption
- func WithGrpcPort(grpcPort int) NodeOption
- func WithHTTPPort(hTTPPort int) NodeOption
- func WithHedgingEnabled(hedgingEnabled bool) NodeOption
- func WithID(iD string) NodeOption
- func WithMetricsPort(metricsPort int) NodeOption
- func WithPid(pid int) NodeOption
- func WithPresharedKey(presharedKey string) NodeOption
- func WithTestDefaults(opts ...NodeOption) NodeOption
- func WithURI(uRI string) NodeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster []*Node
Cluster is a set of spicedb nodes
func NewClusterFromCockroachCluster ¶
func NewClusterFromCockroachCluster(c cockroach.Cluster, opts ...NodeOption) Cluster
NewClusterFromCockroachCluster creates a spicedb instance for every cockroach instance, with each spicedb configured to talk to the corresponding cockraoch node.
func (*Cluster) Connect ¶
Connect blocks until a connection can be made to each instance in the cluster
type Node ¶
type Node struct { ID string Datastore string DBName string URI string GrpcPort int HTTPPort int DispatchPort int MetricsPort int HedgingEnabled bool Pid int Cancel context.CancelFunc // contains filtered or unexported fields }
Node represents a single instance of spicedb started via exec
func NewNodeWithOptions ¶
func NewNodeWithOptions(opts ...NodeOption) *Node
NewNodeWithOptions creates a new Node with the passed in options set
func NodeWithOptions ¶
func NodeWithOptions(n *Node, opts ...NodeOption) *Node
NodeWithOptions configures an existing Node with the passed in options set
func (*Node) Connect ¶
Connect blocks until a connection to the spicedb instance can be established. Once connected, the client is avaialable via Client()
func (*Node) ToOption ¶
func (n *Node) ToOption() NodeOption
ToOption returns a new NodeOption that sets the values from the passed in Node
type NodeOption ¶
type NodeOption func(n *Node)
func WithCancel ¶
func WithCancel(cancel context.CancelFunc) NodeOption
WithCancel returns an option that can set Cancel on a Node
func WithDBName ¶
func WithDBName(dBName string) NodeOption
WithDBName returns an option that can set DBName on a Node
func WithDatastore ¶
func WithDatastore(datastore string) NodeOption
WithDatastore returns an option that can set Datastore on a Node
func WithDispatchPort ¶
func WithDispatchPort(dispatchPort int) NodeOption
WithDispatchPort returns an option that can set DispatchPort on a Node
func WithGrpcPort ¶
func WithGrpcPort(grpcPort int) NodeOption
WithGrpcPort returns an option that can set GrpcPort on a Node
func WithHTTPPort ¶
func WithHTTPPort(hTTPPort int) NodeOption
WithHTTPPort returns an option that can set HTTPPort on a Node
func WithHedgingEnabled ¶
func WithHedgingEnabled(hedgingEnabled bool) NodeOption
WithHedgingEnabled returns an option that can set HedgingEnabled on a Node
func WithMetricsPort ¶
func WithMetricsPort(metricsPort int) NodeOption
WithMetricsPort returns an option that can set MetricsPort on a Node
func WithPid ¶
func WithPid(pid int) NodeOption
WithPid returns an option that can set Pid on a Node
func WithPresharedKey ¶
func WithPresharedKey(presharedKey string) NodeOption
WithPresharedKey returns an option that can set PresharedKey on a Node
func WithTestDefaults ¶
func WithTestDefaults(opts ...NodeOption) NodeOption
WithTestDefaults sets the default values for Node
func WithURI ¶
func WithURI(uRI string) NodeOption
WithURI returns an option that can set URI on a Node