Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetInstanceMetrics gets the instance metrics by instance id. GetInstanceMetrics(ctx context.Context) (*InstanceMetrics, error) }
Client is a client for manipulation of InstanceMetrics.
type FakeClient ¶
type FakeClient struct {
// contains filtered or unexported fields
}
FakeClient implements Client but operates fake objects for testing. This ensure thread-safety.
func NewFakeClient ¶
func NewFakeClient(metrics *InstanceMetrics) *FakeClient
NewFakeClient returns a new *FakeClient initialized with the given fake objects.
func (*FakeClient) GetInstanceMetrics ¶
func (c *FakeClient) GetInstanceMetrics(ctx context.Context) (*InstanceMetrics, error)
GetInstanceMetrics implements Client.
type InstanceMetrics ¶
type InstanceMetrics struct {
CurrentHighPriorityCPUUtilization int
}
InstanceMetrics represents metrics of Spanner instance.
Click to show internal directories.
Click to hide internal directories.