Skip to content

Proposal: do.Shutdown returning shutdown time ? #32

Open
@samber

Description

@samber

My monolith application relies a lot on do.Shutdownable interface. Some tasks call database or third-parties, and flush buffer.

I would like to measure the time of the do.Shutdown processing.

API proposal: duration, err := do.Shutdown()

duration would be either a time.Duration or:

type ShutdownDuration struct {
    All time.Duration
    Services map[string]time.Duration
}

WDYT ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions