signals

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 11 Imported by: 0

README

Core Library (Signal)

One Paragraph of the project description

Initially appeared on gist. But the page cannot open anymore so that is why I have moved it here.

Getting Started

These instructions will give you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on deploying the project on a live system.

Prerequisites

Requirements for the software and other tools to build, test and push

Installing

A step by step series of examples that tell you how to get a development environment running

Say what the step will be

Give the example

And repeat

until finished

End with an example of getting some data out of the system or using it for a little demo

Running the tests

Explain how to run the automated tests for this system

Sample Tests

Explain what these tests test and why

Give an example
Style test

Checks if the best practices and the right coding style has been used.

Give an example

Deployment

Add additional notes to deploy this on a live system

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.

Authors

  • Billie Thompson - Provided README Template - PurpleBooth

See also the list of contributors who participated in this project.

License

This project is licensed under the CC0 1.0 Universal Creative Commons License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code is used
  • Inspiration
  • etc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupSignalHandler

func SetupSignalHandler() (stopCh <-chan struct{})

SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned which is closed on one of these signals. If a second signal is caught, the program is terminated with exit code 1.

Types

type Shutdown

type Shutdown struct {
	// contains filtered or unexported fields
}

func NewShutdown

func NewShutdown(serverShutdownTimeout time.Duration, logger *zap.Logger) (*Shutdown, error)

func (*Shutdown) Graceful

func (s *Shutdown) Graceful(stopCh <-chan struct{}, httpServer *http.Server, httpsServer *http.Server, grpcServer *grpc.Server, healthy *int32, ready *int32)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL