sdk

package
v0.0.0-...-3c8eb91 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRepositoryName = "default"

Variables

View Source
var EmbeddedTemplatesFS = newEmbeddedTemplatesFS()

Functions

func FilesystemFromRepo

func FilesystemFromRepo(uri string) (util.Filesystem, error)

Types

type BuildOption

type BuildOption func(c *BuildOptions)

type BuildOptions

type BuildOptions struct{}

type Builder

type Builder interface {
	Build(context.Context, *dubbo.DubboConfig) error
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *Client

func (*Client) Build

func (c *Client) Build(ctx context.Context, dc *dubbo.DubboConfig, options ...BuildOption) (*dubbo.DubboConfig, error)

func (*Client) Deploy

func (c *Client) Deploy(ctx context.Context, dc *dubbo.DubboConfig, opts ...DeployOption) (*dubbo.DubboConfig, error)

func (*Client) Initialize

func (c *Client) Initialize(dcfg *dubbo.DubboConfig, initialized bool, cmd *cobra.Command) (*dubbo.DubboConfig, error)

func (*Client) Push

func (c *Client) Push(ctx context.Context, dc *dubbo.DubboConfig) (*dubbo.DubboConfig, error)

func (*Client) Repositories

func (c *Client) Repositories() *Repositories

func (*Client) Runtimes

func (c *Client) Runtimes() ([]string, error)

func (*Client) Templates

func (c *Client) Templates() *Templates

type DeployOption

type DeployOption func(f *DeployParams)

type DeployParams

type DeployParams struct {
	// contains filtered or unexported fields
}

type Deployer

type Deployer interface {
	Deploy(context.Context, *dubbo.DubboConfig, ...DeployOption) (DeploymentResult, error)
}

type DeploymentResult

type DeploymentResult struct {
	Status    Status
	Namespace string
}

type Option

type Option func(client *Client)

func WithBuilder

func WithBuilder(b Builder) Option

func WithDeployer

func WithDeployer(d Deployer) Option

func WithPusher

func WithPusher(pusher Pusher) Option

func WithRepositoriesPath

func WithRepositoriesPath(path string) Option

type Pusher

type Pusher interface {
	Push(ctx context.Context, dc *dubbo.DubboConfig) (string, error)
}

type Repositories

type Repositories struct {
	// contains filtered or unexported fields
}

func (*Repositories) Add

func (r *Repositories) Add(name, url string) (string, error)

func (*Repositories) All

func (r *Repositories) All() (repos []Repository, err error)

func (*Repositories) Get

func (r *Repositories) Get(name string) (repo Repository, err error)

func (*Repositories) Remove

func (r *Repositories) Remove(name string) error

type Repository

type Repository struct {
	Name     string
	Runtimes []Runtime
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(name, uri string) (r Repository, err error)

func (*Repository) Runtime

func (r *Repository) Runtime(name string) (runtime Runtime, err error)

func (*Repository) Template

func (r *Repository) Template(runtimeName, name string) (t Template, err error)

func (*Repository) Templates

func (r *Repository) Templates(runtimeName string) ([]Template, error)

func (*Repository) URL

func (r *Repository) URL() string

func (*Repository) Write

func (r *Repository) Write(dest string) (err error)

type Runtime

type Runtime struct {
	Name      string
	Templates []Template
}

type Status

type Status int
const (
	Failed Status = iota
	Deployed
)

type Template

type Template interface {
	Name() string
	Fullname() string
	Runtime() string
	Write(ctx context.Context, f *dubbo.DubboConfig) error
}

type Templates

type Templates struct {
	// contains filtered or unexported fields
}

func (*Templates) Get

func (t *Templates) Get(runtime, fullname string) (Template, error)

func (*Templates) List

func (t *Templates) List(runtime string) ([]string, error)

func (*Templates) Write

func (t *Templates) Write(dc *dubbo.DubboConfig) error

Directories

Path Synopsis
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.

Jump to

Keyboard shortcuts

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