Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Creator ¶
type Creator interface { FutureHandler CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, existingResource interface{}) (interface{}, azureautorest.FutureAPI, error) Get(ctx context.Context, spec azure.ResourceSpecGetter) (interface{}, error) }
Creator is a client that can create or update a resource asynchronously.
type Deleter ¶
type Deleter interface { FutureHandler DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter) (azureautorest.FutureAPI, error) }
Deleter is a client that can delete a resource asynchronously.
type FutureHandler ¶
type FutureHandler interface { // IsDone returns true if the operation is complete. IsDone(ctx context.Context, future azureautorest.FutureAPI) (bool, error) // Result returns the result of the operation. Result(ctx context.Context, future azureautorest.FutureAPI, futureType string) (interface{}, error) }
FutureHandler is a client that can check on the progress of a future.
type FutureScope ¶
type FutureScope interface { azure.AsyncStatusUpdater }
FutureScope is a scope that can perform store futures and conditions in Status.
type Reconciler ¶ added in v1.1.0
type Reconciler interface { CreateResource(ctx context.Context, spec azure.ResourceSpecGetter, serviceName string) (interface{}, error) DeleteResource(ctx context.Context, spec azure.ResourceSpecGetter, serviceName string) error }
Reconciler is a generic interface used to perform asynchronous reconciliation of Azure resources.
type Service ¶ added in v1.1.0
type Service struct { Scope FutureScope Creator Deleter }
Service is an implementation of the Reconciler interface. It handles asynchronous creation and deletion of resources.
func New ¶ added in v1.1.0
func New(scope FutureScope, createClient Creator, deleteClient Deleter) *Service
New creates a new async service.
func (*Service) CreateResource ¶ added in v1.1.0
func (s *Service) CreateResource(ctx context.Context, spec azure.ResourceSpecGetter, serviceName string) (interface{}, error)
CreateResource implements the logic for creating a resource Asynchronously.
func (*Service) DeleteResource ¶ added in v1.1.0
func (s *Service) DeleteResource(ctx context.Context, spec azure.ResourceSpecGetter, serviceName string) error
DeleteResource implements the logic for deleting a resource Asynchronously.
Directories ¶
Path | Synopsis |
---|---|
Package mock_async is a generated GoMock package.
|
Package mock_async is a generated GoMock package. |