Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateUnspecified = spannerv1beta1.InstanceStateUnspecified StateCreating = spannerv1beta1.InstanceStateCreating StateReady = spannerv1beta1.InstanceStateReady )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetInstance gets the instance by instance id. GetInstance(ctx context.Context) (*Instance, error) // GetInstanceMetrics updates the instance whose provided instance id. UpdateInstance(ctx context.Context, instance *Instance) error }
Client is a client for manipulation of Instance.
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(instance *Instance) *FakeClient
NewFakeClient returns a new *FakeClient initialized with the given fake objects.
func (*FakeClient) GetInstance ¶
func (c *FakeClient) GetInstance(ctx context.Context) (*Instance, error)
GetInstance implements Client.
func (*FakeClient) UpdateInstance ¶
func (c *FakeClient) UpdateInstance(ctx context.Context, instance *Instance) error
UpdateInstance implements Client.
type Option ¶
type Option func(*client)
func WithTokenSource ¶
func WithTokenSource(ts oauth2.TokenSource) Option
type State ¶
type State = spannerv1beta1.InstanceState
Click to show internal directories.
Click to hide internal directories.