| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cachix.API.WebSocketSubprotocol
Synopsis
- data Message cmd = Message {}
- data Cache = Cache {}
- data AgentInformation = AgentInformation {}
- data DeploymentDetails = DeploymentDetails {}
- data BackendCommand
- data AgentCommand
- = DeploymentStarted { }
- | DeploymentFinished { }
- parseMessage :: FromJSON cmd => ByteString -> Either Text (Message cmd)
- sendMessage :: ToJSON cmd => Connection -> Message cmd -> IO ()
- receiveDataConcurrently :: Connection -> (ByteString -> IO ()) -> IO ()
- data Log = Log {}
Documentation
Instances
| FromJSON cmd => FromJSON (Message cmd) Source # | |
Defined in Cachix.API.WebSocketSubprotocol | |
| ToJSON cmd => ToJSON (Message cmd) Source # | |
| Generic (Message cmd) Source # | |
| Show cmd => Show (Message cmd) Source # | |
| Eq cmd => Eq (Message cmd) Source # | |
| type Rep (Message cmd) Source # | |
Defined in Cachix.API.WebSocketSubprotocol type Rep (Message cmd) = D1 ('MetaData "Message" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7.3-5QelKZioQAb5fZAnL6kOxB" '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)))) | |
Instances
| FromJSON Cache Source # | |
Defined in Cachix.API.WebSocketSubprotocol | |
| ToJSON Cache Source # | |
| Generic Cache Source # | |
| Show Cache Source # | |
| Eq Cache Source # | |
| type Rep Cache Source # | |
Defined in Cachix.API.WebSocketSubprotocol type Rep Cache = D1 ('MetaData "Cache" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7.3-5QelKZioQAb5fZAnL6kOxB" '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 #
Instances
data DeploymentDetails Source #
Constructors
| DeploymentDetails | |
Instances
data BackendCommand Source #
Constructors
| Deployment DeploymentDetails | |
| AgentRegistered AgentInformation |
Instances
data AgentCommand Source #
Constructors
| DeploymentStarted | |
| DeploymentFinished | |
Instances
parseMessage :: FromJSON cmd => ByteString -> Either Text (Message cmd) Source #
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
Instances
| FromJSON Log Source # | |
Defined in Cachix.API.WebSocketSubprotocol | |
| ToJSON Log Source # | |
| Generic Log Source # | |
| Show Log Source # | |
| type Rep Log Source # | |
Defined in Cachix.API.WebSocketSubprotocol type Rep Log = D1 ('MetaData "Log" "Cachix.API.WebSocketSubprotocol" "cachix-api-1.7.3-5QelKZioQAb5fZAnL6kOxB" 'False) (C1 ('MetaCons "Log" 'PrefixI 'True) (S1 ('MetaSel ('Just "line") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime))) | |