Documentation
¶
Index ¶
- func GetProcessFromFile(pfile string) (*os.Process, error)
- type Addressable
- type Option
- type Server
- type Serverless
- type Watcher
- func (w *Watcher) Clean()
- func (w *Watcher) Exit(errc int)
- func (w *Watcher) GetListeners(servers map[string]Addressable) (map[string]net.Listener, error)
- func (w *Watcher) SetServerless(s Serverless)
- func (w *Watcher) SetServers(s []Server)
- func (w *Watcher) TrapSignals()
- func (w *Watcher) WritePID() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Addressable ¶
Addressable is the interface for exposing address info.
type Server ¶
type Server interface { Start(net.Listener) error Serverless Addressable }
Server is the interface that servers like HTTP or gRPC servers need to implement.
type Serverless ¶
Serverless is the interface that the serverless server implements.
type Watcher ¶
type Watcher struct { SL Serverless // contains filtered or unexported fields }
Watcher watches a process for a graceful restart preserving open network sockets to avoid packet loss.
func (*Watcher) GetListeners ¶
GetListeners return grpc listener first and http listener second.
func (*Watcher) SetServerless ¶
func (w *Watcher) SetServerless(s Serverless)
SetServerless sets the serverless that has to be watched.
func (*Watcher) SetServers ¶
SetServers sets the list of servers that have to be watched.
Click to show internal directories.
Click to hide internal directories.