control

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopCluster

func StopCluster()

StopCluster stops the cluster

func StopSingleInstance

func StopSingleInstance()

StopSingleInstance stops the server

Types

type Cluster

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

Cluster holds information about the cluster

func EnsureCluster

func EnsureCluster() (*Cluster, error)

EnsureCluster either returns an existing cluster instance or starts up a new one

func (*Cluster) AnyFollower

func (cluster *Cluster) AnyFollower() *ClusterMember

AnyFollower returns a follower from the list of current followers

func (*Cluster) AnyReadReplica

func (cluster *Cluster) AnyReadReplica() *ClusterMember

AnyReadReplica returns a read replica from the list of current read replicas

func (*Cluster) AuthToken

func (cluster *Cluster) AuthToken() neo4j.AuthToken

AuthToken returns the configured authentication token

func (*Cluster) Config

func (cluster *Cluster) Config() func(config *neo4j.Config)

Config returns the configured configurer function

func (*Cluster) CoreAddresses

func (cluster *Cluster) CoreAddresses() []neo4j.ServerAddress

CoreAddresses returns the current core members' addresses

func (*Cluster) Cores

func (cluster *Cluster) Cores() []*ClusterMember

Cores returns the current core members in the cluster

func (*Cluster) Followers

func (cluster *Cluster) Followers() []*ClusterMember

Followers returns the current follower members in the cluster

func (*Cluster) Leader

func (cluster *Cluster) Leader() *ClusterMember

Leader returns the current leader in the cluster

func (*Cluster) LeaderAddress

func (cluster *Cluster) LeaderAddress() neo4j.ServerAddress

LeaderAddress returns the current leader's address

func (*Cluster) Password

func (cluster *Cluster) Password() string

Password returns the configured password

func (*Cluster) ReadReplicaAddresses

func (cluster *Cluster) ReadReplicaAddresses() []neo4j.ServerAddress

ReadReplicaAddresses returns the current read replica members' addresses

func (*Cluster) ReadReplicas

func (cluster *Cluster) ReadReplicas() []*ClusterMember

ReadReplicas returns the current read replica members in the cluster

func (*Cluster) Username

func (cluster *Cluster) Username() string

Username returns the configured username

type ClusterMember

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

ClusterMember holds information about a single server in the cluster

func (*ClusterMember) Address

func (member *ClusterMember) Address() neo4j.ServerAddress

Address returns hostname:port identifier for the member

func (*ClusterMember) BoltURI

func (member *ClusterMember) BoltURI() string

BoltURI returns the bolt:// uri used to connect to the member

func (*ClusterMember) Path

func (member *ClusterMember) Path() string

Path returns the folder where the member is installed

func (*ClusterMember) RoutingURI

func (member *ClusterMember) RoutingURI() string

RoutingURI returns the bolt+routing:// uri used to connect to the cluster with this member as the initial router

func (*ClusterMember) String

func (member *ClusterMember) String() string

type ClusterMemberRole

type ClusterMemberRole string

ClusterMemberRole is the type of the server that's part of the causal cluster

const (
	// Leader role
	Leader ClusterMemberRole = "LEADER"
	// Follower role
	Follower ClusterMemberRole = "FOLLOWER"
	// ReadReplica role
	ReadReplica ClusterMemberRole = "READ_REPLICA"
)

type SingleInstance

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

SingleInstance holds information about the single instance server

func EnsureSingleInstance

func EnsureSingleInstance() (*SingleInstance, error)

EnsureSingleInstance either returns an existing server instance or starts up a new one

func (*SingleInstance) AuthToken

func (server *SingleInstance) AuthToken() neo4j.AuthToken

AuthToken returns the configured authentication token

func (*SingleInstance) BoltURI

func (server *SingleInstance) BoltURI() string

BoltURI returns the bolt uri used to connect to the member

func (*SingleInstance) Config

func (server *SingleInstance) Config() func(config *neo4j.Config)

Config returns the configured configurer function

func (*SingleInstance) Driver

func (server *SingleInstance) Driver() (neo4j.Driver, error)

Driver returns a driver instance to the server

func (*SingleInstance) Password

func (server *SingleInstance) Password() string

Password returns the configured password

func (*SingleInstance) Path

func (server *SingleInstance) Path() string

Path returns the folder where the server is installed

func (*SingleInstance) TLSCertificate

func (server *SingleInstance) TLSCertificate() *x509.Certificate

TLSCertificate returns the installed certificate used by the server

func (*SingleInstance) Username

func (server *SingleInstance) Username() string

Username returns the configured username

Jump to

Keyboard shortcuts

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