Documentation
¶
Overview ¶
Package common provides common functionalities and utilities
Index ¶
Constants ¶
This section is empty.
Variables ¶
SharedObjectsForServiceSingleton is the Singleton object that allows sharing states between services
Functions ¶
This section is empty.
Types ¶
type SharedObjectsForService ¶
SharedObjectsForService allows services to shared states of important objects, such as chrome and arc. While this provides access to the important objects, the lifecycle management of these objects is not the responsibility of this struct. Instead individual services will share the responsibility of managing the lifecycle of these objects. A common pattern is to include a reference during Service instantiation and registration. e.g.
testing.AddService(&testing.Service{ Register: func(srv *grpc.Server, s *testing.ServiceState) { automationService := AutomationService{s: s, sharedObject: common.SharedObjectsForServiceSingleton} pb.RegisterAutomationServiceServer(srv, &automationService) }, })
Click to show internal directories.
Click to hide internal directories.