Documentation
¶
Overview ¶
Package cloudflared locates, downloads and runs the cloudflared binary.
Index ¶
- Constants
- Variables
- func AssetName(goos, goarch string) (name string, tarball bool, err error)
- func BinaryName() string
- type Manager
- func (m *Manager) Command(ctx context.Context, path string, opts RunOptions) *exec.Cmd
- func (m *Manager) Download(ctx context.Context) (string, error)
- func (m *Manager) Ensure(ctx context.Context, progress io.Writer) (string, error)
- func (m *Manager) Locate() (string, error)
- func (m *Manager) Path() string
- func (m *Manager) Version(ctx context.Context, path string) (string, error)
- type RunOptions
Constants ¶
View Source
const ReleaseBase = "https://github.com/cloudflare/cloudflared/releases/latest/download/"
ReleaseBase is where the official binaries live.
Variables ¶
View Source
var ErrNotFound = errors.New("cloudflared was not found")
ErrNotFound means no cloudflared binary is available yet.
Functions ¶
Types ¶
type Manager ¶
Manager owns linko's private copy of cloudflared.
type RunOptions ¶
type RunOptions struct {
// Token is the tunnel run token. It is passed via the environment so it
// does not show up in the process list.
Token string
// LogLevel is cloudflared's --loglevel (debug, info, warn, error, fatal).
LogLevel string
// ExtraArgs are appended after `run`.
ExtraArgs []string
}
RunOptions configures a cloudflared run.
Click to show internal directories.
Click to hide internal directories.