Documentation
¶
Overview ¶
Copyright 2020 Lars Eric Scheidler
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Lars Eric Scheidler ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type Application
- func (application *Application) Close()
- func (application *Application) GetInstances(slog *zap.SugaredLogger, conf *conf.Config, environment string, dryrun bool) error
- func (application *Application) InstanceCompleted(function func(string, bool) string) []func() string
- func (application *Application) InstanceHostnames() []func() string
- func (application *Application) Load(slog *zap.SugaredLogger, config *conf.Config, environment string, dryrun bool) error
- func (application *Application) Prefetch(slog *zap.SugaredLogger, environment string) error
- func (application *Application) Switch(slog *zap.SugaredLogger) error
- type Applications
- type Command
- type Error
- type Instance
- func (instance *Instance) Close()
- func (instance *Instance) Completed(function func(string, bool) string) func() string
- func (instance *Instance) Connect() error
- func (instance *Instance) Connected() bool
- func (instance *Instance) CurrentVersion() *Version
- func (instance *Instance) Dns() bool
- func (instance *Instance) GetVersion(application string) *Command
- func (instance *Instance) Hostname() string
- func (instance *Instance) NewCommand(command string, description string) *Command
- func (instance *Instance) Prefetch(application string, version string) *Command
- func (instance *Instance) Switch(application string, version string) *Command
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Name string Version string SuccessfulInstances []*Instance FailedInstances []*Instance Errors []*Error }
func NewApplication ¶
func NewApplication(name string, version string) *Application
func (*Application) Close ¶
func (application *Application) Close()
func (*Application) GetInstances ¶
func (application *Application) GetInstances(slog *zap.SugaredLogger, conf *conf.Config, environment string, dryrun bool) error
func (*Application) InstanceCompleted ¶
func (application *Application) InstanceCompleted(function func(string, bool) string) []func() string
func (*Application) InstanceHostnames ¶
func (application *Application) InstanceHostnames() []func() string
func (*Application) Load ¶
func (application *Application) Load(slog *zap.SugaredLogger, config *conf.Config, environment string, dryrun bool) error
func (*Application) Prefetch ¶
func (application *Application) Prefetch(slog *zap.SugaredLogger, environment string) error
func (*Application) Switch ¶
func (application *Application) Switch(slog *zap.SugaredLogger) error
type Applications ¶
type Applications []*Application
func (*Applications) Close ¶
func (applications *Applications) Close()
func (*Applications) Set ¶
func (i *Applications) Set(value string) error
Set is the method to set the flag value, part of the flag.Value interface. Set's argument is a string to be parsed to set the flag. It's a comma-separated list, so we split it.
func (*Applications) String ¶
func (i *Applications) String() string
String is the method to format the flag's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
type Instance ¶
type Instance struct { Commands []*Command Errors []*Error // contains filtered or unexported fields }