cardano-node-1.33.0
Safe HaskellNone
LanguageHaskell2010

Cardano.Node.Handlers.Shutdown

Synopsis

Generalised shutdown handling

data ShutdownConfig Source #

Constructors

ShutdownConfig 

Fields

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

ShutdownArmedAtSlot SlotNo

Will terminate upon reaching maxSlot

Instances

Instances details
Generic ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Associated Types

type Rep ShutdownTraceTypeType Source #

ToJSON ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Methods

toJSONShutdownTrace → Value #

toEncodingShutdownTrace → Encoding #

toJSONList ∷ [ShutdownTrace] → Value #

toEncodingList ∷ [ShutdownTrace] → Encoding #

FromJSON ShutdownTrace Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Methods

parseJSON ∷ Value → Parser ShutdownTrace #

parseJSONList ∷ Value → Parser [ShutdownTrace] #

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

Methods

formatTextShutdownTrace → Object → Text #

ToObject ShutdownTrace Source # 
Instance details

Defined in Cardano.Tracing.Shutdown

Methods

toObjectTracingVerbosityShutdownTrace → Object #

textTransformerShutdownTrace → Object → Text #

LogFormatting ShutdownTrace 
Instance details

Defined in Cardano.Node.Tracing.Tracers.Shutdown

Methods

forMachine ∷ DetailLevel → ShutdownTrace → Object

forHumanShutdownTraceText

asMetricsShutdownTrace → [Metric]

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-1.33.0-inplace" 'False) ((C1 ('MetaCons "ShutdownRequested" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "AbnormalShutdown" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "ShutdownUnexpectedInput" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "RequestingShutdown" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ShutdownArmedAtSlot" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)))))

Watch ChainDB for passing a configured slot sync limit threshold,

maybeSpawnOnSlotSyncedShutdownHandlerShutdownConfigTracer 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.