Documentation ¶
Index ¶
- func StopCluster()
- func StopSingleInstance()
- type Cluster
- func (cluster *Cluster) AnyFollower() *ClusterMember
- func (cluster *Cluster) AnyReadReplica() *ClusterMember
- func (cluster *Cluster) AuthToken() neo4j.AuthToken
- func (cluster *Cluster) Config() func(config *neo4j.Config)
- func (cluster *Cluster) CoreAddresses() []neo4j.ServerAddress
- func (cluster *Cluster) Cores() []*ClusterMember
- func (cluster *Cluster) Followers() []*ClusterMember
- func (cluster *Cluster) Leader() *ClusterMember
- func (cluster *Cluster) LeaderAddress() neo4j.ServerAddress
- func (cluster *Cluster) Password() string
- func (cluster *Cluster) ReadReplicaAddresses() []neo4j.ServerAddress
- func (cluster *Cluster) ReadReplicas() []*ClusterMember
- func (cluster *Cluster) Username() string
- type ClusterMember
- type ClusterMemberRole
- type SingleInstance
- func (server *SingleInstance) AuthToken() neo4j.AuthToken
- func (server *SingleInstance) BoltURI() string
- func (server *SingleInstance) Config() func(config *neo4j.Config)
- func (server *SingleInstance) Driver() (neo4j.Driver, error)
- func (server *SingleInstance) Password() string
- func (server *SingleInstance) Path() string
- func (server *SingleInstance) TLSCertificate() *x509.Certificate
- func (server *SingleInstance) Username() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster holds information about the cluster
func EnsureCluster ¶
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) 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) 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
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