cql-io-1.1.1: Cassandra CQL client.

Safe HaskellNone
LanguageHaskell2010

Database.CQL.IO.Cluster.Host

Synopsis

Documentation

data Host Source #

A Cassandra host known to the client.

Constructors

Host 
Instances
Eq Host Source # 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

(==) :: Host -> Host -> Bool #

(/=) :: Host -> Host -> Bool #

Ord Host Source # 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

compare :: Host -> Host -> Ordering #

(<) :: Host -> Host -> Bool #

(<=) :: Host -> Host -> Bool #

(>) :: Host -> Host -> Bool #

(>=) :: Host -> Host -> Bool #

max :: Host -> Host -> Host #

min :: Host -> Host -> Host #

Show Host Source # 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

showsPrec :: Int -> Host -> ShowS #

show :: Host -> String #

showList :: [Host] -> ShowS #

data HostResponse k a b Source #

A response that is known to originate from a specific Host.

Constructors

HostResponse 

Fields

Instances
Show b => Show (HostResponse k a b) Source # 
Instance details

Defined in Database.CQL.IO.Cluster.Host

Methods

showsPrec :: Int -> HostResponse k a b -> ShowS #

show :: HostResponse k a b -> String #

showList :: [HostResponse k a b] -> ShowS #

data HostEvent Source #

This event will be passed to a Policy to inform it about cluster changes.

Constructors

HostNew !Host

a new host has been added to the cluster

HostGone !InetAddr

a host has been removed from the cluster

HostUp !InetAddr

a host has been started

HostDown !InetAddr

a host has been stopped

hostAddr :: Lens' Host InetAddr Source #

The IP address and port number of a host.

dataCentre :: Lens' Host Text Source #

The data centre name (may be an empty string).

rack :: Lens' Host Text Source #

The rack name (may be an empty string).

sock2inet :: PortNumber -> SockAddr -> InetAddr Source #

Map a SockAddr into an InetAddr, using the given port number.

ip2inet :: PortNumber -> IP -> InetAddr Source #

Map an IP into an InetAddr, using the given port number.