dockeropts

package
v0.0.0-...-d1d2547 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package dockeropts provides various methods to modify docker service start arguments (a.k.a DOCKER_OPTS)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor interface {
	ChangeOpts(contents, args string) (out string, err error)
}

Editor describes an implementation that can take a init config for docker service and modify the start arguments and return the new init config contents.

type SystemdUnitEditor

type SystemdUnitEditor struct{}

SystemdUnitEditor modifies the 'ExecStart=' line as 'ExecStart=/usr/bin/docker $args'. If ExecStart line does not exist, returns error.

func (SystemdUnitEditor) ChangeOpts

func (e SystemdUnitEditor) ChangeOpts(contents, args string) (string, error)

type UpstartCfgEditor

type UpstartCfgEditor struct{}

UpstartCfgEditor finds the line that contains 'DOCKER_OPTS=' and replaces with the given args. If not found, appends a new line with given configuration.

func (UpstartCfgEditor) ChangeOpts

func (e UpstartCfgEditor) ChangeOpts(contents, args string) (string, error)

Jump to

Keyboard shortcuts

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