proxyfile

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClonesStrategy

type ClonesStrategy struct {
	FsLinkCreator
}

ClonesStrategy contains the implementation of creating clones of droxy executable.

func NewClonesStrategy

func NewClonesStrategy() ClonesStrategy

NewClonesStrategy creates a new FileCreationStrategy that produces clones of droxy command.

func (ClonesStrategy) CreateProxyFile

func (s ClonesStrategy) CreateProxyFile(commandBinaryFilePath, commandNameFilePath string) error

CreateProxyFile creates a clone of the given commandBinaryFilePath to commandNameFilePath.

type Creator

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

Creator creates commands.

func New

func New(creationStrategy FileCreationStrategy, configLoader Loader) Creator

New creates a new proxy file creator.

func (Creator) CreateProxyFiles

func (pfc Creator) CreateProxyFiles(isForced bool) error

CreateProxyFiles creates droxy commands.

type FileCreationStrategy

type FileCreationStrategy interface {
	CreateProxyFile(string, string) error
}

FileCreationStrategy defines the interface for creation of a droxy commands in filesystem.

type FsLinkCreator added in v0.7.0

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

func NewHardlinkStrategy

func NewHardlinkStrategy() FsLinkCreator

NewHardlinkStrategy creates a new FsLinkCreator that produces hardlinks of droxy command.

func NewSymlinkStrategy

func NewSymlinkStrategy() FsLinkCreator

NewSymlinkStrategy creates a new FsLinkCreator that produces symlinks of droxy command.

func (FsLinkCreator) CreateProxyFile added in v0.7.0

func (c FsLinkCreator) CreateProxyFile(commandBinaryFilePath, commandNameFilePath string) error

type Loader added in v0.7.0

type Loader interface {
	Load() config.Configuration
}

Loader is able to locate and load configuration from a config file.

Jump to

Keyboard shortcuts

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