Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GlobalServices ¶
type GlobalServices struct {
// contains filtered or unexported fields
}
GlobalServices is an application singleton that stores cross-request service structures.
It lives in the root context.
func NewGlobalServices ¶
NewGlobalServices instantiates a new GlobalServices instance.
Receives the location of the BigTable with intermediate logs.
The Context passed to GlobalServices should be a global server Context not a request-specific Context.
func (*GlobalServices) StorageForStream ¶
func (gsvc *GlobalServices) StorageForStream(ctx context.Context, lst *coordinator.LogStreamState, project string) ( coordinator.SigningStorage, error)
Storage returns a Storage instance for the supplied log stream.
The caller must close the returned instance if successful.
type Services ¶
type Services interface { // Storage returns a Storage instance for the supplied log stream. // // The caller must close the returned instance if successful. StorageForStream(ctx context.Context, state *coordinator.LogStreamState, project string) (coordinator.SigningStorage, error) }
Services is a set of support services used by Coordinator endpoints.
Each instance is valid for a single request, but can be re-used throughout that request. This is advised, as the Services instance may optionally cache values.
Services methods are goroutine-safe.
func GetServices ¶
GetServices gets the Services instance installed in the supplied Context.
If no Services has been installed, it will panic.
type StorageCache ¶
type StorageCache struct {
// contains filtered or unexported fields
}
StorageCache implements a generic storage.Cache for Storage instances.
This uses the process cache for the underlying cache.