Documentation
¶
Index ¶
Constants ¶
const ROUTING_QUERY = `` /* 181-byte string literal not displayed */
Denormalize the routing table to make post-processing easier
const VERSION_QUERY = `` /* 250-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func (*Backend) Authenticate ¶
For now, we'll authenticate to all known hosts up-front to simplify things. So for a given Hello message, use it to auth against all hosts known in the current routing table.
Returns an map[string] of hosts to bolt.BoltConn's if successful, an empty map and an error if not.
func (*Backend) ClusterInfo ¶ added in v0.4.0
func (b *Backend) ClusterInfo() (ClusterInfo, error)
func (*Backend) RoutingTable ¶
func (b *Backend) RoutingTable(db string) (RoutingTable, error)
type ClusterInfo ¶ added in v0.4.0
func (ClusterInfo) String ¶ added in v0.4.0
func (i ClusterInfo) String() string
type Monitor ¶
type Monitor struct {
Info <-chan ClusterInfo
Version Version
Ttl time.Duration
Host string
// contains filtered or unexported fields
}
TODO: what the hell are we doing here?
func NewMonitor ¶
Construct and start a new routing table Monitor using the provided user, password, and uri as arguments to the underlying neo4j.Driver. Returns a pointer to the Monitor on success, or nil and an error on failure.
Any additional hosts provided will be used as part of a custom address resolution function via the neo4j.Driver.
func (Monitor) UpdateRoutingTable ¶ added in v0.4.0
func (m Monitor) UpdateRoutingTable(db string) (RoutingTable, error)
type RoutingTable ¶
type RoutingTable struct {
Name string
Readers, Writers, Routers []string
CreatedAt time.Time
Ttl time.Duration
}
func (RoutingTable) Expired ¶
func (rt RoutingTable) Expired() bool
func (RoutingTable) String ¶
func (t RoutingTable) String() string