Documentation
¶
Index ¶
- Constants
- Variables
- func AcceptTerms() error
- func CanIUseProvider(ctx context.Context, client FabricClient, provider Provider, ...) error
- func GetAnonID() string
- func GetExistingToken(cluster string) string
- func GetRegion(provider ProviderID) string
- func GetRegionVarName(provider ProviderID) string
- func GetTokenFile(cluster string) string
- func GetWebIdentityTokenFile(cluster string) (string, error)
- func IsNetworkError(err error) bool
- func LoadProjectNameWithFallback(ctx context.Context, loader Loader, provider Provider) (string, error)
- func NormalizeHost(cluster string) string
- func PrettyError(err error) error
- func SaveAccessToken(cluster, token string) error
- func TermsAccepted() bool
- type AccountInfo
- type CdCommand
- type CdCommandRequest
- type DNSResolver
- type DeployRequest
- type ErrDeploymentFailed
- type ErrNotImplemented
- type FabricClient
- type GrpcClient
- func (g GrpcClient) AgreeToS(ctx context.Context) error
- func (g GrpcClient) CanIUse(ctx context.Context, req *defangv1.CanIUseRequest) (*defangv1.CanIUseResponse, error)
- func (g GrpcClient) CheckLoginAndToS(ctx context.Context) error
- func (g GrpcClient) CreateDelegateSubdomainZone(ctx context.Context, req *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
- func (g GrpcClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
- func (g GrpcClient) Debug(ctx context.Context, req *defangv1.DebugRequest) (*defangv1.DebugResponse, error)
- func (g GrpcClient) DeleteSubdomainZone(ctx context.Context, req *defangv1.DeleteSubdomainZoneRequest) error
- func (g GrpcClient) Estimate(ctx context.Context, req *defangv1.EstimateRequest) (*defangv1.EstimateResponse, error)
- func (g GrpcClient) GenerateCompose(ctx context.Context, req *defangv1.GenerateComposeRequest) (*defangv1.GenerateComposeResponse, error)
- func (g GrpcClient) GenerateFiles(ctx context.Context, req *defangv1.GenerateFilesRequest) (*defangv1.GenerateFilesResponse, error)
- func (g GrpcClient) GetDefaultStack(ctx context.Context, req *defangv1.GetDefaultStackRequest) (*defangv1.GetStackResponse, error)
- func (g GrpcClient) GetDelegateSubdomainZone(ctx context.Context, req *defangv1.GetDelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
- func (g GrpcClient) GetFabricClient() defangv1connect.FabricControllerClient
- func (g GrpcClient) GetPlaygroundProjectDomain(ctx context.Context) (*defangv1.GetPlaygroundProjectDomainResponse, error)
- func (g GrpcClient) GetRequestedTenant() types.TenantNameOrID
- func (g GrpcClient) GetTenantName() types.TenantLabel
- func (g GrpcClient) GetVersions(ctx context.Context) (*defangv1.Version, error)
- func (g GrpcClient) ListDeployments(ctx context.Context, req *defangv1.ListDeploymentsRequest) (*defangv1.ListDeploymentsResponse, error)
- func (g GrpcClient) ListStacks(ctx context.Context, req *defangv1.ListStacksRequest) (*defangv1.ListStacksResponse, error)
- func (g GrpcClient) Preview(ctx context.Context, req *defangv1.PreviewRequest) (*defangv1.PreviewResponse, error)
- func (g GrpcClient) Publish(ctx context.Context, req *defangv1.PublishRequest) error
- func (g GrpcClient) PutDeployment(ctx context.Context, req *defangv1.PutDeploymentRequest) error
- func (g GrpcClient) PutStack(ctx context.Context, req *defangv1.PutStackRequest) error
- func (g GrpcClient) RevokeToken(ctx context.Context) error
- func (g *GrpcClient) SetFabricClient(client defangv1connect.FabricControllerClient)
- func (g GrpcClient) SetOptions(ctx context.Context, req *defangv1.SetOptionsRequest) error
- func (g GrpcClient) Token(ctx context.Context, req *defangv1.TokenRequest) (*defangv1.TokenResponse, error)
- func (g GrpcClient) Track(event string, properties ...Property) error
- func (g GrpcClient) VerifyDNSSetup(ctx context.Context, req *defangv1.VerifyDNSSetupRequest) error
- func (g GrpcClient) WhoAmI(ctx context.Context) (*defangv1.WhoAmIResponse, error)
- type Loader
- type MockFabricClient
- func (m MockFabricClient) AgreeToS(ctx context.Context) error
- func (m MockFabricClient) CanIUse(ctx context.Context, req *defangv1.CanIUseRequest) (*defangv1.CanIUseResponse, error)
- func (m MockFabricClient) CreateDelegateSubdomainZone(context.Context, *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
- func (m MockFabricClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
- func (m MockFabricClient) DeleteSubdomainZone(context.Context, *defangv1.DeleteSubdomainZoneRequest) error
- func (m MockFabricClient) GetDefaultStack(context.Context, *defangv1.GetDefaultStackRequest) (*defangv1.GetStackResponse, error)
- func (m MockFabricClient) GetDelegateSubdomainZone(context.Context, *defangv1.GetDelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
- func (m MockFabricClient) GetFabricClient() defangv1connect.FabricControllerClient
- func (m MockFabricClient) GetPlaygroundProjectDomain(ctx context.Context) (*defangv1.GetPlaygroundProjectDomainResponse, error)
- func (m MockFabricClient) GetTenantName() types.TenantLabel
- func (m MockFabricClient) ListDeployments(ctx context.Context, req *defangv1.ListDeploymentsRequest) (*defangv1.ListDeploymentsResponse, error)
- func (m MockFabricClient) PutDeployment(ctx context.Context, req *defangv1.PutDeploymentRequest) error
- func (m MockFabricClient) PutStack(ctx context.Context, req *defangv1.PutStackRequest) error
- type MockLoader
- type MockProvider
- func (m MockProvider) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
- func (MockProvider) GetStackName() string
- func (MockProvider) GetStackNameForDomain() string
- func (m MockProvider) ListConfig(ctx context.Context, req *defangv1.ListConfigsRequest) (*defangv1.Secrets, error)
- func (m MockProvider) ServicePrivateDNS(service string) string
- func (m MockProvider) ServicePublicDNS(service string, projectName string) string
- func (MockProvider) UpdateShardDomain(ctx context.Context) error
- type MockServerStream
- type MockWaitStream
- type PlaygroundProvider
- func (g *PlaygroundProvider) AccountInfo(ctx context.Context) (*AccountInfo, error)
- func (g *PlaygroundProvider) CdCommand(ctx context.Context, req CdCommandRequest) (types.ETag, error)
- func (g *PlaygroundProvider) CdList(context.Context, bool) (iter.Seq[string], error)
- func (g *PlaygroundProvider) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
- func (g *PlaygroundProvider) DeleteConfig(ctx context.Context, req *defangv1.Secrets) error
- func (g *PlaygroundProvider) Deploy(ctx context.Context, req *DeployRequest) (*defangv1.DeployResponse, error)
- func (g *PlaygroundProvider) Estimate(ctx context.Context, req *defangv1.EstimateRequest) (*defangv1.EstimateResponse, error)
- func (g *PlaygroundProvider) GetDeploymentStatus(ctx context.Context) error
- func (g *PlaygroundProvider) GetProjectUpdate(context.Context, string) (*defangv1.ProjectUpdate, error)
- func (g *PlaygroundProvider) GetService(ctx context.Context, req *defangv1.GetRequest) (*defangv1.ServiceInfo, error)
- func (g *PlaygroundProvider) GetServices(ctx context.Context, req *defangv1.GetServicesRequest) (*defangv1.GetServicesResponse, error)
- func (g *PlaygroundProvider) GetStackName() string
- func (PlaygroundProvider) GetStackNameForDomain() string
- func (g *PlaygroundProvider) ListConfig(ctx context.Context, req *defangv1.ListConfigsRequest) (*defangv1.Secrets, error)
- func (g *PlaygroundProvider) PrepareDomainDelegation(ctx context.Context, req PrepareDomainDelegationRequest) (*PrepareDomainDelegationResponse, error)
- func (g *PlaygroundProvider) Preview(ctx context.Context, req *DeployRequest) (*defangv1.DeployResponse, error)
- func (g *PlaygroundProvider) PutConfig(ctx context.Context, req *defangv1.PutConfigRequest) error
- func (g *PlaygroundProvider) QueryForDebug(ctx context.Context, req *defangv1.DebugRequest) error
- func (g *PlaygroundProvider) QueryLogs(ctx context.Context, req *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
- func (g *PlaygroundProvider) RemoteProjectName(ctx context.Context) (string, error)
- func (g *PlaygroundProvider) ServicePrivateDNS(name string) string
- func (g *PlaygroundProvider) ServicePublicDNS(name string, projectName string) string
- func (g *PlaygroundProvider) SetCanIUseConfig(*defangv1.CanIUseResponse)
- func (g *PlaygroundProvider) SetUpCD(ctx context.Context) error
- func (g *PlaygroundProvider) Subscribe(ctx context.Context, req *defangv1.SubscribeRequest) (ServerStream[defangv1.SubscribeResponse], error)
- func (g *PlaygroundProvider) TearDownCD(ctx context.Context) error
- func (g *PlaygroundProvider) UpdateShardDomain(ctx context.Context) error
- type PrepareDomainDelegationRequest
- type PrepareDomainDelegationResponse
- type Property
- type Provider
- type ProviderID
- type Retrier
- type RetryDelayer
- type ServerStream
- type State
Constants ¶
View Source
const ( RegionDefaultAWS = "us-west-2" RegionDefaultDO = "nyc3" RegionDefaultGCP = "us-central1" // Defaults to us-central1 for lower price )
View Source
const DefaultCluster = "fabric-prod1.defang.dev"
Variables ¶
View Source
var DefangFabric = pkg.Getenv("DEFANG_FABRIC", DefaultCluster)
View Source
var ( // StateDir is the directory where the state file is stored StateDir = filepath.Join(stateDir, "defang") )
Functions ¶
func AcceptTerms ¶
func AcceptTerms() error
func CanIUseProvider ¶
func GetExistingToken ¶
func GetRegion ¶
func GetRegion(provider ProviderID) string
func GetRegionVarName ¶
func GetRegionVarName(provider ProviderID) string
func GetTokenFile ¶
func GetWebIdentityTokenFile ¶
func IsNetworkError ¶
func NormalizeHost ¶
func PrettyError ¶
func SaveAccessToken ¶
func TermsAccepted ¶
func TermsAccepted() bool
Types ¶
type AccountInfo ¶
type AccountInfo struct {
AccountID string
Details string
Provider ProviderID
Region string
}
func (AccountInfo) String ¶
func (a AccountInfo) String() string
type CdCommandRequest ¶
type DNSResolver ¶
type DeployRequest ¶
type DeployRequest struct {
defangv1.DeployRequest
StatesUrl string
EventsUrl string
}
type ErrDeploymentFailed ¶
func (ErrDeploymentFailed) Error ¶
func (e ErrDeploymentFailed) Error() string
type ErrNotImplemented ¶
type ErrNotImplemented string
func (ErrNotImplemented) Error ¶
func (n ErrNotImplemented) Error() string
type FabricClient ¶
type FabricClient interface {
AgreeToS(context.Context) error
CanIUse(context.Context, *defangv1.CanIUseRequest) (*defangv1.CanIUseResponse, error)
CheckLoginAndToS(context.Context) error
CreateDelegateSubdomainZone(context.Context, *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
CreateUploadURL(context.Context, *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
Debug(context.Context, *defangv1.DebugRequest) (*defangv1.DebugResponse, error)
DeleteSubdomainZone(context.Context, *defangv1.DeleteSubdomainZoneRequest) error
Estimate(context.Context, *defangv1.EstimateRequest) (*defangv1.EstimateResponse, error)
GenerateCompose(context.Context, *defangv1.GenerateComposeRequest) (*defangv1.GenerateComposeResponse, error)
GenerateFiles(context.Context, *defangv1.GenerateFilesRequest) (*defangv1.GenerateFilesResponse, error)
GetFabricClient() defangv1connect.FabricControllerClient
GetDelegateSubdomainZone(context.Context, *defangv1.GetDelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
GetPlaygroundProjectDomain(context.Context) (*defangv1.GetPlaygroundProjectDomainResponse, error)
GetDefaultStack(context.Context, *defangv1.GetDefaultStackRequest) (*defangv1.GetStackResponse, error)
GetTenantName() types.TenantLabel
GetVersions(context.Context) (*defangv1.Version, error)
ListDeployments(context.Context, *defangv1.ListDeploymentsRequest) (*defangv1.ListDeploymentsResponse, error)
Preview(context.Context, *defangv1.PreviewRequest) (*defangv1.PreviewResponse, error)
Publish(context.Context, *defangv1.PublishRequest) error
PutDeployment(context.Context, *defangv1.PutDeploymentRequest) error
PutStack(context.Context, *defangv1.PutStackRequest) error
RevokeToken(context.Context) error
Token(context.Context, *defangv1.TokenRequest) (*defangv1.TokenResponse, error)
Track(string, ...Property) error
VerifyDNSSetup(context.Context, *defangv1.VerifyDNSSetupRequest) error
WhoAmI(context.Context) (*defangv1.WhoAmIResponse, error)
}
type GrpcClient ¶
type GrpcClient struct {
Tenant types.TenantLabel
// contains filtered or unexported fields
}
func NewGrpcClient ¶
func NewGrpcClient(host, accessToken string, requestedTenant types.TenantNameOrID) *GrpcClient
func (GrpcClient) CanIUse ¶
func (g GrpcClient) CanIUse(ctx context.Context, req *defangv1.CanIUseRequest) (*defangv1.CanIUseResponse, error)
func (GrpcClient) CheckLoginAndToS ¶
func (g GrpcClient) CheckLoginAndToS(ctx context.Context) error
func (GrpcClient) CreateDelegateSubdomainZone ¶
func (g GrpcClient) CreateDelegateSubdomainZone(ctx context.Context, req *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
func (GrpcClient) CreateUploadURL ¶
func (g GrpcClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
func (GrpcClient) Debug ¶
func (g GrpcClient) Debug(ctx context.Context, req *defangv1.DebugRequest) (*defangv1.DebugResponse, error)
func (GrpcClient) DeleteSubdomainZone ¶
func (g GrpcClient) DeleteSubdomainZone(ctx context.Context, req *defangv1.DeleteSubdomainZoneRequest) error
func (GrpcClient) Estimate ¶
func (g GrpcClient) Estimate(ctx context.Context, req *defangv1.EstimateRequest) (*defangv1.EstimateResponse, error)
func (GrpcClient) GenerateCompose ¶
func (g GrpcClient) GenerateCompose(ctx context.Context, req *defangv1.GenerateComposeRequest) (*defangv1.GenerateComposeResponse, error)
func (GrpcClient) GenerateFiles ¶
func (g GrpcClient) GenerateFiles(ctx context.Context, req *defangv1.GenerateFilesRequest) (*defangv1.GenerateFilesResponse, error)
func (GrpcClient) GetDefaultStack ¶
func (g GrpcClient) GetDefaultStack(ctx context.Context, req *defangv1.GetDefaultStackRequest) (*defangv1.GetStackResponse, error)
func (GrpcClient) GetDelegateSubdomainZone ¶
func (g GrpcClient) GetDelegateSubdomainZone(ctx context.Context, req *defangv1.GetDelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
func (GrpcClient) GetFabricClient ¶
func (g GrpcClient) GetFabricClient() defangv1connect.FabricControllerClient
func (GrpcClient) GetPlaygroundProjectDomain ¶
func (g GrpcClient) GetPlaygroundProjectDomain(ctx context.Context) (*defangv1.GetPlaygroundProjectDomainResponse, error)
func (GrpcClient) GetRequestedTenant ¶
func (g GrpcClient) GetRequestedTenant() types.TenantNameOrID
func (GrpcClient) GetTenantName ¶
func (g GrpcClient) GetTenantName() types.TenantLabel
func (GrpcClient) GetVersions ¶
func (GrpcClient) ListDeployments ¶
func (g GrpcClient) ListDeployments(ctx context.Context, req *defangv1.ListDeploymentsRequest) (*defangv1.ListDeploymentsResponse, error)
func (GrpcClient) ListStacks ¶
func (g GrpcClient) ListStacks(ctx context.Context, req *defangv1.ListStacksRequest) (*defangv1.ListStacksResponse, error)
func (GrpcClient) Preview ¶
func (g GrpcClient) Preview(ctx context.Context, req *defangv1.PreviewRequest) (*defangv1.PreviewResponse, error)
func (GrpcClient) Publish ¶
func (g GrpcClient) Publish(ctx context.Context, req *defangv1.PublishRequest) error
func (GrpcClient) PutDeployment ¶
func (g GrpcClient) PutDeployment(ctx context.Context, req *defangv1.PutDeploymentRequest) error
func (GrpcClient) PutStack ¶
func (g GrpcClient) PutStack(ctx context.Context, req *defangv1.PutStackRequest) error
func (GrpcClient) RevokeToken ¶
func (g GrpcClient) RevokeToken(ctx context.Context) error
func (*GrpcClient) SetFabricClient ¶
func (g *GrpcClient) SetFabricClient(client defangv1connect.FabricControllerClient)
func (GrpcClient) SetOptions ¶
func (g GrpcClient) SetOptions(ctx context.Context, req *defangv1.SetOptionsRequest) error
func (GrpcClient) Token ¶
func (g GrpcClient) Token(ctx context.Context, req *defangv1.TokenRequest) (*defangv1.TokenResponse, error)
func (GrpcClient) VerifyDNSSetup ¶
func (g GrpcClient) VerifyDNSSetup(ctx context.Context, req *defangv1.VerifyDNSSetupRequest) error
func (GrpcClient) WhoAmI ¶
func (g GrpcClient) WhoAmI(ctx context.Context) (*defangv1.WhoAmIResponse, error)
type MockFabricClient ¶
type MockFabricClient struct {
FabricClient
DelegateDomain string
}
func (MockFabricClient) CanIUse ¶
func (m MockFabricClient) CanIUse(ctx context.Context, req *defangv1.CanIUseRequest) (*defangv1.CanIUseResponse, error)
func (MockFabricClient) CreateDelegateSubdomainZone ¶
func (m MockFabricClient) CreateDelegateSubdomainZone(context.Context, *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
func (MockFabricClient) CreateUploadURL ¶
func (m MockFabricClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
func (MockFabricClient) DeleteSubdomainZone ¶
func (m MockFabricClient) DeleteSubdomainZone(context.Context, *defangv1.DeleteSubdomainZoneRequest) error
func (MockFabricClient) GetDefaultStack ¶
func (m MockFabricClient) GetDefaultStack(context.Context, *defangv1.GetDefaultStackRequest) (*defangv1.GetStackResponse, error)
func (MockFabricClient) GetDelegateSubdomainZone ¶
func (m MockFabricClient) GetDelegateSubdomainZone(context.Context, *defangv1.GetDelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
func (MockFabricClient) GetFabricClient ¶
func (m MockFabricClient) GetFabricClient() defangv1connect.FabricControllerClient
func (MockFabricClient) GetPlaygroundProjectDomain ¶
func (m MockFabricClient) GetPlaygroundProjectDomain(ctx context.Context) (*defangv1.GetPlaygroundProjectDomainResponse, error)
func (MockFabricClient) GetTenantName ¶
func (m MockFabricClient) GetTenantName() types.TenantLabel
func (MockFabricClient) ListDeployments ¶
func (m MockFabricClient) ListDeployments(ctx context.Context, req *defangv1.ListDeploymentsRequest) (*defangv1.ListDeploymentsResponse, error)
func (MockFabricClient) PutDeployment ¶
func (m MockFabricClient) PutDeployment(ctx context.Context, req *defangv1.PutDeploymentRequest) error
func (MockFabricClient) PutStack ¶
func (m MockFabricClient) PutStack(ctx context.Context, req *defangv1.PutStackRequest) error
type MockLoader ¶
type MockLoader struct {
Project composeTypes.Project
Error error
}
func (MockLoader) CreateProjectForDebug ¶
func (m MockLoader) CreateProjectForDebug() (*composeTypes.Project, error)
func (MockLoader) LoadProject ¶
func (m MockLoader) LoadProject(ctx context.Context) (*composeTypes.Project, error)
func (MockLoader) LoadProjectName ¶
func (m MockLoader) LoadProjectName(ctx context.Context) (string, error)
func (MockLoader) TargetDirectory ¶
func (m MockLoader) TargetDirectory() string
type MockProvider ¶
func (MockProvider) CreateUploadURL ¶
func (m MockProvider) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
func (MockProvider) GetStackName ¶
func (MockProvider) GetStackName() string
func (MockProvider) GetStackNameForDomain ¶
func (MockProvider) GetStackNameForDomain() string
func (MockProvider) ListConfig ¶
func (m MockProvider) ListConfig(ctx context.Context, req *defangv1.ListConfigsRequest) (*defangv1.Secrets, error)
func (MockProvider) ServicePrivateDNS ¶
func (m MockProvider) ServicePrivateDNS(service string) string
func (MockProvider) ServicePublicDNS ¶
func (m MockProvider) ServicePublicDNS(service string, projectName string) string
func (MockProvider) UpdateShardDomain ¶
func (MockProvider) UpdateShardDomain(ctx context.Context) error
type MockServerStream ¶
type MockServerStream[Msg any] struct { Resps []*Msg Error error // contains filtered or unexported fields }
MockServerStream mocks a ServerStream.
func (*MockServerStream[T]) Close ¶
func (*MockServerStream[T]) Close() error
func (*MockServerStream[T]) Err ¶
func (m *MockServerStream[T]) Err() error
func (*MockServerStream[T]) Msg ¶
func (m *MockServerStream[T]) Msg() *T
func (*MockServerStream[T]) Receive ¶
func (m *MockServerStream[T]) Receive() bool
type MockWaitStream ¶
type MockWaitStream[T any] struct { // contains filtered or unexported fields }
MockWaitStream is a mock implementation of the ServerStream interface that returns messages and errors from channels. It blocks until the channels are closed or an error is received. It is used for testing purposes.
func NewMockWaitStream ¶
func NewMockWaitStream[T any]() *MockWaitStream[T]
NewMockWaitStream returns a ServerStream that will block until closed.
func (*MockWaitStream[T]) Close ¶
func (m *MockWaitStream[T]) Close() error
func (*MockWaitStream[T]) Err ¶
func (m *MockWaitStream[T]) Err() error
func (*MockWaitStream[T]) Msg ¶
func (m *MockWaitStream[T]) Msg() *T
func (*MockWaitStream[T]) Receive ¶
func (m *MockWaitStream[T]) Receive() bool
func (*MockWaitStream[T]) Send ¶
func (m *MockWaitStream[T]) Send(msg *T, err error)
type PlaygroundProvider ¶
type PlaygroundProvider struct {
FabricClient
RetryDelayer
// contains filtered or unexported fields
}
func (*PlaygroundProvider) AccountInfo ¶
func (g *PlaygroundProvider) AccountInfo(ctx context.Context) (*AccountInfo, error)
func (*PlaygroundProvider) CdCommand ¶
func (g *PlaygroundProvider) CdCommand(ctx context.Context, req CdCommandRequest) (types.ETag, error)
func (*PlaygroundProvider) CreateUploadURL ¶
func (g *PlaygroundProvider) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
func (*PlaygroundProvider) DeleteConfig ¶
func (*PlaygroundProvider) Deploy ¶
func (g *PlaygroundProvider) Deploy(ctx context.Context, req *DeployRequest) (*defangv1.DeployResponse, error)
func (*PlaygroundProvider) Estimate ¶
func (g *PlaygroundProvider) Estimate(ctx context.Context, req *defangv1.EstimateRequest) (*defangv1.EstimateResponse, error)
func (*PlaygroundProvider) GetDeploymentStatus ¶
func (g *PlaygroundProvider) GetDeploymentStatus(ctx context.Context) error
func (*PlaygroundProvider) GetProjectUpdate ¶
func (g *PlaygroundProvider) GetProjectUpdate(context.Context, string) (*defangv1.ProjectUpdate, error)
func (*PlaygroundProvider) GetService ¶
func (g *PlaygroundProvider) GetService(ctx context.Context, req *defangv1.GetRequest) (*defangv1.ServiceInfo, error)
func (*PlaygroundProvider) GetServices ¶
func (g *PlaygroundProvider) GetServices(ctx context.Context, req *defangv1.GetServicesRequest) (*defangv1.GetServicesResponse, error)
func (*PlaygroundProvider) GetStackName ¶
func (g *PlaygroundProvider) GetStackName() string
func (PlaygroundProvider) GetStackNameForDomain ¶
func (PlaygroundProvider) GetStackNameForDomain() string
func (*PlaygroundProvider) ListConfig ¶
func (g *PlaygroundProvider) ListConfig(ctx context.Context, req *defangv1.ListConfigsRequest) (*defangv1.Secrets, error)
func (*PlaygroundProvider) PrepareDomainDelegation ¶
func (g *PlaygroundProvider) PrepareDomainDelegation(ctx context.Context, req PrepareDomainDelegationRequest) (*PrepareDomainDelegationResponse, error)
func (*PlaygroundProvider) Preview ¶
func (g *PlaygroundProvider) Preview(ctx context.Context, req *DeployRequest) (*defangv1.DeployResponse, error)
func (*PlaygroundProvider) PutConfig ¶
func (g *PlaygroundProvider) PutConfig(ctx context.Context, req *defangv1.PutConfigRequest) error
func (*PlaygroundProvider) QueryForDebug ¶
func (g *PlaygroundProvider) QueryForDebug(ctx context.Context, req *defangv1.DebugRequest) error
func (*PlaygroundProvider) QueryLogs ¶
func (g *PlaygroundProvider) QueryLogs(ctx context.Context, req *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
func (*PlaygroundProvider) RemoteProjectName ¶
func (g *PlaygroundProvider) RemoteProjectName(ctx context.Context) (string, error)
func (*PlaygroundProvider) ServicePrivateDNS ¶
func (g *PlaygroundProvider) ServicePrivateDNS(name string) string
func (*PlaygroundProvider) ServicePublicDNS ¶
func (g *PlaygroundProvider) ServicePublicDNS(name string, projectName string) string
func (*PlaygroundProvider) SetCanIUseConfig ¶
func (g *PlaygroundProvider) SetCanIUseConfig(*defangv1.CanIUseResponse)
func (*PlaygroundProvider) SetUpCD ¶
func (g *PlaygroundProvider) SetUpCD(ctx context.Context) error
func (*PlaygroundProvider) Subscribe ¶
func (g *PlaygroundProvider) Subscribe(ctx context.Context, req *defangv1.SubscribeRequest) (ServerStream[defangv1.SubscribeResponse], error)
func (*PlaygroundProvider) TearDownCD ¶
func (g *PlaygroundProvider) TearDownCD(ctx context.Context) error
func (*PlaygroundProvider) UpdateShardDomain ¶
func (g *PlaygroundProvider) UpdateShardDomain(ctx context.Context) error
type Provider ¶
type Provider interface {
DNSResolver
AccountInfo(context.Context) (*AccountInfo, error)
CdCommand(context.Context, CdCommandRequest) (types.ETag, error)
CdList(context.Context, bool) (iter.Seq[string], error)
CreateUploadURL(context.Context, *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
DelayBeforeRetry(context.Context) error
DeleteConfig(context.Context, *defangv1.Secrets) error
Deploy(context.Context, *DeployRequest) (*defangv1.DeployResponse, error)
GetDeploymentStatus(context.Context) error // nil means deployment is pending/running; io.EOF means deployment is done
GetProjectUpdate(context.Context, string) (*defangv1.ProjectUpdate, error)
GetService(context.Context, *defangv1.GetRequest) (*defangv1.ServiceInfo, error)
GetServices(context.Context, *defangv1.GetServicesRequest) (*defangv1.GetServicesResponse, error)
GetStackName() string
GetStackNameForDomain() string
ListConfig(context.Context, *defangv1.ListConfigsRequest) (*defangv1.Secrets, error)
PrepareDomainDelegation(context.Context, PrepareDomainDelegationRequest) (*PrepareDomainDelegationResponse, error)
Preview(context.Context, *DeployRequest) (*defangv1.DeployResponse, error)
PutConfig(context.Context, *defangv1.PutConfigRequest) error
QueryForDebug(context.Context, *defangv1.DebugRequest) error
QueryLogs(context.Context, *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
RemoteProjectName(context.Context) (string, error)
SetCanIUseConfig(*defangv1.CanIUseResponse)
SetUpCD(context.Context) error
Subscribe(context.Context, *defangv1.SubscribeRequest) (ServerStream[defangv1.SubscribeResponse], error)
TearDownCD(context.Context) error
}
type ProviderID ¶
type ProviderID string
const ( ProviderAuto ProviderID = "auto" ProviderDefang ProviderID = "defang" ProviderAWS ProviderID = "aws" ProviderDO ProviderID = "digitalocean" ProviderGCP ProviderID = "gcp" )
func AllProviders ¶
func AllProviders() []ProviderID
func (ProviderID) Name ¶
func (p ProviderID) Name() string
func (*ProviderID) Set ¶
func (p *ProviderID) Set(str string) error
func (*ProviderID) SetValue ¶
func (p *ProviderID) SetValue(val defangv1.Provider)
func (ProviderID) String ¶
func (p ProviderID) String() string
func (ProviderID) Type ¶
func (p ProviderID) Type() string
func (ProviderID) Value ¶
func (p ProviderID) Value() defangv1.Provider
type Retrier ¶
type Retrier struct{}
func (Retrier) WrapStreamingClient ¶
func (Retrier) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (Retrier) WrapStreamingHandler ¶
func (Retrier) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type RetryDelayer ¶
func (*RetryDelayer) DelayBeforeRetry ¶
func (r *RetryDelayer) DelayBeforeRetry(ctx context.Context) error
type ServerStream ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.