bindings

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIType_CFAPI           = "cfapi"
	APIType_PRJFS           = "prjfs"
	APIType_CFAPI_Simplfied = "cfapi-simplified"
)
View Source
const UseCFAPI bool = true

Variables

This section is empty.

Functions

func BindVirtualizationInstance

func BindVirtualizationInstance(id string, config *BaseConfig, remotefs afero.Fs, context InstanceContext) (io.Closer, error)

func CloseOnSigTerm

func CloseOnSigTerm(closers ...io.Closer)

func ConfigToFlags

func ConfigToFlags(config any)

func ReadConfigFromRegistry

func ReadConfigFromRegistry(key registry.Key, config any) error

Types

type BaseConfig

type BaseConfig struct {
	LocalPath string `flag:"localpath,Local folder" reg:"LocalPath"`
	Type      string `flag:"type,Type of binding" reg:"Type"`
	API       string `flag:"api,Type of API to be used of" reg:"API"`
}

func (*BaseConfig) IsCFAPI added in v0.2.0

func (config *BaseConfig) IsCFAPI() bool

func (*BaseConfig) IsSimplfied added in v0.2.0

func (config *BaseConfig) IsSimplfied() bool

type BindingConfig

type BindingConfig interface {
	Validate() error
	ToFileSystem(zerolog.Logger) (afero.Fs, error)
}

func CreateConfigByType

func CreateConfigByType(typestr string) BindingConfig

type InstanceContext added in v0.2.0

type InstanceContext struct {
	Logger            zerolog.Logger
	StateCallback     func(core.ConnectionState)
	FileStateCallback func(core.FileSyncState)
}

func (InstanceContext) ConnectionStateChanged added in v0.2.0

func (context InstanceContext) ConnectionStateChanged(id string, syninprogress bool, err error)

Directories

Path Synopsis
This file is a fork of https://github.com/spf13/afero/blob/master/basepath.go modified to always use "/" as separator regardless of the host system
This file is a fork of https://github.com/spf13/afero/blob/master/basepath.go modified to always use "/" as separator regardless of the host system

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳