cardano-node-1.36.0
Safe HaskellNone
LanguageHaskell2010

Cardano.Node.Handlers.Shutdown

Synopsis

Documentation

data ShutdownOn Source #

Instances

Instances details
Eq ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Show 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 ShutdownOnTypeType Source #

ToJSON ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Methods

toJSONShutdownOn → Value #

toEncodingShutdownOn → Encoding #

toJSONList ∷ [ShutdownOn] → Value #

toEncodingList ∷ [ShutdownOn] → Encoding #

FromJSON ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

Methods

parseJSON ∷ Value → Parser ShutdownOn #

parseJSONList ∷ Value → Parser [ShutdownOn] #

type Rep ShutdownOn Source # 
Instance details

Defined in Cardano.Node.Handlers.Shutdown

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

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
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.36.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 "ShutdownArmedAt" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShutdownOn)))))

Watch ChainDB for passing a configured slot sync limit threshold,

maybeSpawnOnSlotSyncedShutdownHandler ∷ HasHeader (Header blk) ⇒ ShutdownConfigTracer 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.

Orphan instances

ToJSON BlockNo Source # 
Instance details

Methods

toJSONBlockNo → Value #

toEncodingBlockNo → Encoding #

toJSONList ∷ [BlockNo] → Value #

toEncodingList ∷ [BlockNo] → Encoding #

FromJSON BlockNo Source # 
Instance details

Methods

parseJSON ∷ Value → Parser BlockNo #

parseJSONList ∷ Value → Parser [BlockNo] #