cardano-node-8.8.1: The cardano full node
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Node.Handlers.Shutdown

Synopsis

Documentation

data ShutdownOn Source #

Instances

Instances details
FromJSON ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

ToJSON ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Generic ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Associated Types

type Rep ShutdownOn :: Type -> Type Source #

Show ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

NFData ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Methods

rnf :: ShutdownOn -> () Source #

Eq ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

type Rep ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

type Rep ShutdownOn = D1 ('MetaData "ShutdownOn" "Cardano.Node.Handlers.Shutdown" "cardano-node-8.8.1-inplace" 'False) (C1 ('MetaCons "ASlot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :+: (C1 ('MetaCons "ABlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockNo)) :+: C1 ('MetaCons "NoShutdown" 'PrefixI 'False) (U1 :: Type -> Type)))

Generalised shutdown handling

withShutdownHandling Source #

Arguments

:: ShutdownConfig 
-> Tracer IO ShutdownTrace 
-> IO ()

Action to potentially shutdown via file descriptor

-> IO () 

We provide an optional cross-platform method to politely request shut down. The parent process passes us the file descriptor number of the read end of a pipe, via the CLI with --shutdown-ipc FD

data ShutdownTrace Source #

Constructors

ShutdownRequested

Received shutdown request

AbnormalShutdown

Non-isEOFError shutdown request

ShutdownUnexpectedInput Text

Received shutdown request but found unexpected input in --shutdown-ipc FD:

RequestingShutdown Text

Ringing the node shutdown doorbell for reason

ShutdownArmedAt ShutdownOn

Will terminate upon reaching a ChainDB sync limit

Instances

Instances details
FromJSON ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

ToJSON ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Generic ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Associated Types

type Rep ShutdownTrace :: Type -> Type Source #

NFData ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Methods

rnf :: ShutdownTrace -> () Source #

HasPrivacyAnnotation ShutdownTrace Source # 
Instance details

Defined in Cardano.Tracing.Shutdown

HasSeverityAnnotation ShutdownTrace Source # 
Instance details

Defined in Cardano.Tracing.Shutdown

HasTextFormatter ShutdownTrace Source # 
Instance details

Defined in Cardano.Tracing.Shutdown

ToObject ShutdownTrace Source # 
Instance details

Defined in Cardano.Tracing.Shutdown

LogFormatting ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Tracing.Tracers.Shutdown

MetaTrace ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Tracing.Tracers.Shutdown

Transformable Text IO ShutdownTrace Source # 
Instance details

Defined in Cardano.Tracing.Shutdown

type Rep ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

type Rep ShutdownTrace = D1 ('MetaData "ShutdownTrace" "Cardano.Node.Handlers.Shutdown" "cardano-node-8.8.1-inplace" 'False) ((C1 ('MetaCons "ShutdownRequested" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AbnormalShutdown" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ShutdownUnexpectedInput" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "RequestingShutdown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ShutdownArmedAt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShutdownOn)))))

Watch ChainDB for passing a configured slot sync limit threshold,

maybeSpawnOnSlotSyncedShutdownHandler :: HasHeader (Header blk) => ShutdownConfig -> Tracer IO ShutdownTrace -> ResourceRegistry IO -> ChainDB IO blk -> IO () Source #

Spawn a thread that would cause node to shutdown upon ChainDB reaching the configuration-defined slot.