Documentation ¶
Overview ¶
Package focus provides a gRPC service for raising the application.
Index ¶
Constants ¶
const (
Host = "127.0.0.1"
)
Variables ¶
This section is empty.
Functions ¶
func TryRaise ¶
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 ¶
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 ¶
func NewService(locator service.Locator, version *semver.Version, panicHandler async.PanicHandler) (*Service, error)
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.
func (*Service) Raise ¶
func (service *Service) Raise(_ context.Context, reason *wrapperspb.StringValue) (*emptypb.Empty, error)
Raise implements the gRPC FocusService interface; it raises the application.