Documentation ¶
Overview ¶
Package focus provides a gRPC service for raising the application.
Index ¶
Constants ¶
View Source
const Host = "127.0.0.1"
Host is the local host to listen on.
Variables ¶
View Source
var Port = 1042 // nolint:gochecknoglobals
Port is the port to listen on.
Functions ¶
func TryRaise ¶
func TryRaise() bool
TryRaise tries to raise the application by dialing the focus service. It returns true if the service is running and the application was told to raise.
func TryVersion ¶
func TryVersion() (*semver.Version, bool)
TryVersion tries to determine the version of the running application instance. It returns the version and true if the version could be determined.
Types ¶
type Service ¶
type Service struct { proto.UnimplementedFocusServer // contains filtered or unexported fields }
Service is a gRPC service that can be used to raise the application.
func NewService ¶
NewService creates a new focus service. It listens on the local host and port 1042 (by default).
func (*Service) GetRaiseCh ¶
func (service *Service) GetRaiseCh() <-chan struct{}
GetRaiseCh returns a channel on which events are sent when the application should be raised.
Click to show internal directories.
Click to hide internal directories.