setup

package
v2.32.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFunc

type CreateFunc func(ctx context.Context, zone string) (accessor.ID, error)

CreateFunc リソース作成関数

type DeleteFunc

type DeleteFunc func(ctx context.Context, zone string, id types.ID) error

DeleteFunc リソース削除関数。

リソース作成時のコピー待ちの間にリソースのAvailabilityがFailedになった場合に利用される。

type MaxRetryCountExceededError

type MaxRetryCountExceededError error

MaxRetryCountExceededError リトライ最大数超過エラー

type ProvisionBeforeUpFunc

type ProvisionBeforeUpFunc func(ctx context.Context, zone string, id types.ID, target interface{}) error

ProvisionBeforeUpFunc リソース作成後、起動前のプロビジョニング関数

リソース作成後に起動が行われないリソース(VPCルータなど)向け。 必要であればこの中でリソース起動処理を行う。

type ReadFunc

type ReadFunc func(ctx context.Context, zone string, id types.ID) (interface{}, error)

ReadFunc リソース起動待ちなどで利用するリソースのRead用Func

type RetryableSetup

type RetryableSetup struct {
	// Create リソース作成用関数
	Create CreateFunc
	// IsWaitForCopy コピー待ちを行うか
	IsWaitForCopy bool
	// IsWaitForUp 起動待ちを行うか
	IsWaitForUp bool
	// ProvisionBeforeUp リソース起動前のプロビジョニング関数
	ProvisionBeforeUp ProvisionBeforeUpFunc
	// Delete リソース削除用関数
	Delete DeleteFunc
	// WaitForUp リソース起動待ち関数
	Read ReadFunc
	// RetryCount リトライ回数
	RetryCount int
	// ProvisioningRetryCount プロビジョニングリトライ回数
	ProvisioningRetryCount int
	// ProvisioningRetryInterval プロビジョニングリトライ間隔
	ProvisioningRetryInterval time.Duration
	// DeleteRetryCount 削除リトライ回数
	DeleteRetryCount int
	// DeleteRetryInterval 削除リトライ間隔
	DeleteRetryInterval time.Duration
	// sacloud.StateWaiterによるステート待ちの間隔
	PollingInterval time.Duration
}

RetryableSetup リソース作成時にコピー待ちや起動待ちが必要なリソースのビルダー。

リソースのビルドの際、必要に応じてリトライ(リソースの削除&再作成)を行う。

func (*RetryableSetup) Setup

func (r *RetryableSetup) Setup(ctx context.Context, zone string) (interface{}, error)

Setup リソースのビルドを行う。必要に応じてリトライ(リソースの削除&再作成)を行う。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL