Nacelle

Go service framework
/

Process registration functional options

The github.com/go-nacelle/process/v2 package provides the following functional options supplied during process registration.


WithMetaName

WithMetaName sets the name of the process used in log messages.

WithMetaPriority

WithMetaPriority sets the relative priority of the process. Lower priorities are initialized earlier (and finalized alter).

WithMetadata

WithMetadata sets additional metadata on the process available in log messages.

WithEarlyExit

WithEarlyExit marks the process as being able to exit before process shutdown is initiated without it being considered a fatal error. This option is what separates initializers from processes.

WithMetaInitTimeout

WithMetaInitTimeout sets the timeout of the Init method.

WithMetaStartupTimeout

WithMetaStartupTimeout sets the timeout between the invocation of the Run method and the process reporting healthy.

WithMetaStopTimeout

WithMetaStopTimeout sets the timeout of the Stop method.

WithMetaShutdownTimeout

WithMetaShutdownTimeout sets the timeout between the initiation of the shutdown sequence and the return of the Run method.

WithMetaFinalizeTimeout

WithMetaFinalizeTimeout sets the timeout of the Finalize method.