cachix-api-1.7: Servant HTTP API specification for https://cachix.org
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cachix.API.WebSocketSubprotocol

Synopsis

Documentation

data Message cmd Source #

Constructors

Message 

Fields

Instances

Instances details
FromJSON cmd => FromJSON (Message cmd) Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON cmd => ToJSON (Message cmd) Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic (Message cmd) Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep (Message cmd) :: Type -> Type #

Methods

from :: Message cmd -> Rep (Message cmd) x #

to :: Rep (Message cmd) x -> Message cmd #

Show cmd => Show (Message cmd) Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Methods

showsPrec :: Int -> Message cmd -> ShowS #

show :: Message cmd -> String #

showList :: [Message cmd] -> ShowS #

Eq cmd => Eq (Message cmd) Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Methods

(==) :: Message cmd -> Message cmd -> Bool #

(/=) :: Message cmd -> Message cmd -> Bool #

type Rep (Message cmd) Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep (Message cmd) = D1 ('MetaData "Message" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "Message" 'PrefixI 'True) ((S1 ('MetaSel ('Just "method") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "command") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 cmd)) :*: (S1 ('MetaSel ('Just "agent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UUID)) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID))))

data Cache Source #

Constructors

Cache 

Instances

Instances details
FromJSON Cache Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON Cache Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic Cache Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep Cache :: Type -> Type #

Methods

from :: Cache -> Rep Cache x #

to :: Rep Cache x -> Cache #

Show Cache Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Methods

showsPrec :: Int -> Cache -> ShowS #

show :: Cache -> String #

showList :: [Cache] -> ShowS #

Eq Cache Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Methods

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

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

type Rep Cache Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep Cache = D1 ('MetaData "Cache" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "Cache" 'PrefixI 'True) (S1 ('MetaSel ('Just "cacheName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "publicKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "isPublic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

data AgentInformation Source #

Constructors

AgentInformation 

Fields

Instances

Instances details
FromJSON AgentInformation Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON AgentInformation Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic AgentInformation Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep AgentInformation :: Type -> Type #

Show AgentInformation Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Eq AgentInformation Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep AgentInformation Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep AgentInformation = D1 ('MetaData "AgentInformation" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "AgentInformation" 'PrefixI 'True) (S1 ('MetaSel ('Just "cache") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Cache)) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)))

data DeploymentDetails Source #

Instances

Instances details
FromJSON DeploymentDetails Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON DeploymentDetails Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic DeploymentDetails Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep DeploymentDetails :: Type -> Type #

Show DeploymentDetails Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Eq DeploymentDetails Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep DeploymentDetails Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep DeploymentDetails = D1 ('MetaData "DeploymentDetails" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "DeploymentDetails" 'PrefixI 'True) ((S1 ('MetaSel ('Just "storePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)) :*: (S1 ('MetaSel ('Just "index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64) :*: S1 ('MetaSel ('Just "rollbackScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

data BackendCommand Source #

Instances

Instances details
FromJSON BackendCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON BackendCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic BackendCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep BackendCommand :: Type -> Type #

Show BackendCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Eq BackendCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep BackendCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep BackendCommand = D1 ('MetaData "BackendCommand" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "Deployment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DeploymentDetails)) :+: C1 ('MetaCons "AgentRegistered" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AgentInformation)))

data AgentCommand Source #

Instances

Instances details
FromJSON AgentCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON AgentCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic AgentCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep AgentCommand :: Type -> Type #

Show AgentCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Eq AgentCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep AgentCommand Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep AgentCommand = D1 ('MetaData "AgentCommand" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "DeploymentStarted" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID) :*: (S1 ('MetaSel ('Just "time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "closureSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int64)))) :+: C1 ('MetaCons "DeploymentFinished" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID) :*: (S1 ('MetaSel ('Just "time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "hasSucceeded") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

sendMessage :: ToJSON cmd => Connection -> Message cmd -> IO () Source #

receiveDataConcurrently :: Connection -> (ByteString -> IO ()) -> IO () Source #

Receive and process messages in parallel.

Note: This will not rethrow the CloseRequest exception!

TODO: use Async.replicateConcurrently

data Log Source #

Constructors

Log 

Fields

Instances

Instances details
FromJSON Log Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

ToJSON Log Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Generic Log Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Associated Types

type Rep Log :: Type -> Type #

Methods

from :: Log -> Rep Log x #

to :: Rep Log x -> Log #

Show Log Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

Methods

showsPrec :: Int -> Log -> ShowS #

show :: Log -> String #

showList :: [Log] -> ShowS #

type Rep Log Source # 
Instance details

Defined in Cachix.API.WebSocketSubprotocol

type Rep Log = D1 ('MetaData "Log" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7-r3y0KDwwOhFjtCXK2jHiK" 'False) (C1 ('MetaCons "Log" 'PrefixI 'True) (S1 ('MetaSel ('Just "line") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))