actions

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

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

func (*Actions) CreateRelay

func (a *Actions) CreateRelay(ctx context.Context, relayOpts *opts.RelayOptions) (*types.Relay, error)

func (*Actions) CreateTunnel added in v1.4.0

func (a *Actions) CreateTunnel(reqCtx context.Context, tunnelOpts *opts.TunnelOptions) (*types.Tunnel, error)

func (*Actions) DeleteRelay

func (a *Actions) DeleteRelay(ctx context.Context, relayID string) (*types.Relay, error)

DeleteRelay stops a relay (if active) and delete it from persistent storage

func (*Actions) DeleteTunnel added in v1.4.0

func (a *Actions) DeleteTunnel(ctx context.Context, tunnelID string) error

func (*Actions) ResumeRelay

func (a *Actions) ResumeRelay(ctx context.Context, relayID string) (*types.Relay, error)

func (*Actions) ResumeTunnel added in v1.4.0

func (a *Actions) ResumeTunnel(ctx context.Context, tunnelID string) (*types.Tunnel, error)

func (*Actions) StopRelay

func (a *Actions) StopRelay(ctx context.Context, relayID string) (*types.Relay, error)

func (Actions) StopTunnel added in v1.4.0

func (a Actions) StopTunnel(ctx context.Context, tunnelID string) (*types.Tunnel, error)

func (*Actions) UpdateRelay added in v1.3.0

func (a *Actions) UpdateRelay(ctx context.Context, relayID string, relayOpts *opts.RelayOptions) (*types.Relay, error)

func (*Actions) UpdateTunnel added in v1.4.0

func (a *Actions) UpdateTunnel(ctx context.Context, tunnelID string, tunnelOpts *opts.TunnelOptions) (*types.Tunnel, error)

type Config

type Config struct {
	PersistentConfig *config.Config
}

type IActions added in v1.5.2

type IActions interface {
	// relay
	CreateRelay(ctx context.Context, relayOpts *opts.RelayOptions) (*types.Relay, error)
	DeleteRelay(context.Context, string) (*types.Relay, error)
	StopRelay(ctx context.Context, relayID string) (*types.Relay, error)
	ResumeRelay(ctx context.Context, relayID string) (*types.Relay, error)
	UpdateRelay(ctx context.Context, relayID string, relayOpts *opts.RelayOptions) (*types.Relay, error)

	// tunnel
	CreateTunnel(reqCtx context.Context, tunnelOpts *opts.TunnelOptions) (*types.Tunnel, error)
	ResumeTunnel(ctx context.Context, tunnelID string) (*types.Tunnel, error)
	StopTunnel(ctx context.Context, tunnelID string) (*types.Tunnel, error)
	UpdateTunnel(ctx context.Context, tunnelID string, tunnelOpts *opts.TunnelOptions) (*types.Tunnel, error)
	DeleteTunnel(ctx context.Context, tunnelID string) error
}

func New

func New(cfg *Config) (IActions, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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