fakes

package
v0.0.0-...-a8aec34 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This file was generated by counterfeiter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentClient

type AgentClient struct {
	VerifyJoinedCalls struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
	VerifySyncedCalls struct {
		CallCount int
		Returns   struct {
			Errors []error
			Error  error
		}
	}

	SetKeysCall struct {
		Receives struct {
			Keys        []string
			KeyringFile string
		}
		Returns struct {
			Error error
		}
	}

	LeaveCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}

	MembersCall struct {
		CallCount int
		Receives  struct {
			WAN bool
		}
		Returns struct {
			Members []*api.AgentMember
			Error   error
		}
	}

	JoinMembersCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
	SelfCall struct {
		CallCount int
		Returns   struct {
			Error  error
			Errors []error
		}
	}
	ListKeysCall struct {
		CallCount int
		Returns   struct {
			Keys  []string
			Error error
		}
	}
	InstallKeyCall struct {
		CallCount int
		Receives  struct {
			Key string
		}
		Returns struct {
			Error error
		}
	}
	UseKeyCall struct {
		CallCount int
		Receives  struct {
			Key string
		}
		Returns struct {
			Error error
		}
	}
	RemoveKeyCall struct {
		CallCount int
		Receives  struct {
			Key string
		}
		Returns struct {
			Error error
		}
	}
}

func (*AgentClient) InstallKey

func (c *AgentClient) InstallKey(key string) error

func (*AgentClient) JoinMembers

func (c *AgentClient) JoinMembers() error

func (*AgentClient) Leave

func (c *AgentClient) Leave() error

func (*AgentClient) ListKeys

func (c *AgentClient) ListKeys() ([]string, error)

func (*AgentClient) Members

func (c *AgentClient) Members(wan bool) ([]*api.AgentMember, error)

func (*AgentClient) RemoveKey

func (c *AgentClient) RemoveKey(key string) error

func (*AgentClient) Self

func (c *AgentClient) Self() error

func (*AgentClient) SetKeys

func (c *AgentClient) SetKeys(keys []string, keyringFile string) error

func (*AgentClient) UseKey

func (c *AgentClient) UseKey(key string) error

func (*AgentClient) VerifyJoined

func (c *AgentClient) VerifyJoined() error

func (*AgentClient) VerifySynced

func (c *AgentClient) VerifySynced() error

type AgentRunner

type AgentRunner struct {
	RunCalls struct {
		CallCount int
		Returns   struct {
			Errors []error
		}
	}

	StopCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}

	WaitCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}

	CleanupCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}

	WritePIDCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
}

func (*AgentRunner) Cleanup

func (r *AgentRunner) Cleanup() error

func (*AgentRunner) Run

func (r *AgentRunner) Run() error

func (*AgentRunner) Stop

func (r *AgentRunner) Stop() error

func (*AgentRunner) Wait

func (r *AgentRunner) Wait() error

func (*AgentRunner) WritePID

func (r *AgentRunner) WritePID() error

type BootstrapChecker

type BootstrapChecker struct {
	StartInBootstrapModeCall struct {
		CallCount int
		Returns   struct {
			Bootstrap bool
			Error     error
		}
	}
}

func (*BootstrapChecker) StartInBootstrapMode

func (b *BootstrapChecker) StartInBootstrapMode() (bool, error)

type Clock

type Clock struct {
	SleepCall struct {
		CallCount int
		Receives  struct {
			Duration time.Duration
		}
	}
}

func (*Clock) Sleep

func (c *Clock) Sleep(duration time.Duration)

type ConfigWriter

type ConfigWriter struct {
	WriteCall struct {
		CallCount int
		Configs   []config.Config
		Stub      func(config config.Config) error
		Receives  struct {
			Config config.Config
		}
		Returns struct {
			Error error
		}
	}
}

func (*ConfigWriter) Write

func (w *ConfigWriter) Write(cfg config.Config) error

type Controller

type Controller struct {
	WriteServiceDefinitionsCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}

	BootAgentCall struct {
		CallCount int
		Stub      func(timeout utils.Timeout) error
		Receives  struct {
			Timeout utils.Timeout
		}
		Returns struct {
			Error error
		}
	}

	ConfigureServerCall struct {
		CallCount int
		Receives  struct {
			Timeout utils.Timeout
		}
		Returns struct {
			Error error
		}
	}

	ConfigureClientCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}

	StopAgentCall struct {
		CallCount int
	}
}

func (*Controller) BootAgent

func (c *Controller) BootAgent(timeout utils.Timeout) error

func (*Controller) ConfigureClient

func (c *Controller) ConfigureClient() error

func (*Controller) ConfigureServer

func (c *Controller) ConfigureServer(timeout utils.Timeout) error

func (*Controller) StopAgent

func (c *Controller) StopAgent()

func (*Controller) WriteServiceDefinitions

func (c *Controller) WriteServiceDefinitions() error

type FakeconsulAPIAgent

type FakeconsulAPIAgent struct {
	MembersStub func(wan bool) ([]*api.AgentMember, error)

	JoinCall struct {
		CallCount int
		Stub      func(member string, wan bool) error
		Receives  struct {
			Members []string
			WAN     bool
		}
		Returns struct {
			Error error
		}
	}
	SelfCall struct {
		CallCount int
		Returns   struct {
			SelfInfo map[string]map[string]interface{}
			Error    error
		}
	}
	LeaveCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
	// contains filtered or unexported fields
}

func (*FakeconsulAPIAgent) Join

func (fake *FakeconsulAPIAgent) Join(member string, wan bool) error

func (*FakeconsulAPIAgent) Leave

func (fake *FakeconsulAPIAgent) Leave() error

func (*FakeconsulAPIAgent) Members

func (fake *FakeconsulAPIAgent) Members(wan bool) ([]*api.AgentMember, error)

func (*FakeconsulAPIAgent) MembersArgsForCall

func (fake *FakeconsulAPIAgent) MembersArgsForCall(i int) bool

func (*FakeconsulAPIAgent) MembersCallCount

func (fake *FakeconsulAPIAgent) MembersCallCount() int

func (*FakeconsulAPIAgent) MembersReturns

func (fake *FakeconsulAPIAgent) MembersReturns(result1 []*api.AgentMember, result2 error)

func (*FakeconsulAPIAgent) Self

func (fake *FakeconsulAPIAgent) Self() (map[string]map[string]interface{}, error)

type FakeconsulAPIOperator

type FakeconsulAPIOperator struct {
	KeyringListCall struct {
		CallCount int
		Receives  struct {
			QueryOptions *api.QueryOptions
		}
		Returns struct {
			KeyringResponse []*api.KeyringResponse
			Error           error
		}
	}

	KeyringInstallCall struct {
		CallCount int
		Receives  struct {
			Key          string
			WriteOptions *api.WriteOptions
		}
		Returns struct {
			Error error
		}
	}

	KeyringUseCall struct {
		CallCount int
		Receives  struct {
			Key          string
			WriteOptions *api.WriteOptions
		}
		Returns struct {
			Error error
		}
	}

	KeyringRemoveCall struct {
		CallCount int
		Receives  struct {
			Key          string
			WriteOptions *api.WriteOptions
		}
		Returns struct {
			Error error
		}
	}
}

func (*FakeconsulAPIOperator) KeyringInstall

func (o *FakeconsulAPIOperator) KeyringInstall(key string, writeOptions *api.WriteOptions) error

func (*FakeconsulAPIOperator) KeyringList

func (o *FakeconsulAPIOperator) KeyringList(queryOptions *api.QueryOptions) ([]*api.KeyringResponse, error)

func (*FakeconsulAPIOperator) KeyringRemove

func (o *FakeconsulAPIOperator) KeyringRemove(key string, writeOptions *api.WriteOptions) error

func (*FakeconsulAPIOperator) KeyringUse

func (o *FakeconsulAPIOperator) KeyringUse(key string, writeOptions *api.WriteOptions) error

type FakeconsulAPIStatus

type FakeconsulAPIStatus struct {
	LeaderCall struct {
		CallCount int
		Returns   struct {
			Leader string
			Error  error
		}
	}
}

func (*FakeconsulAPIStatus) Leader

func (s *FakeconsulAPIStatus) Leader() (string, error)

type KeyringRemover

type KeyringRemover struct {
	ExecuteCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
}

func (*KeyringRemover) Execute

func (kr *KeyringRemover) Execute() error

type Logger

type Logger struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Logger) Error

func (l *Logger) Error(action string, err error, data ...lager.Data)

func (*Logger) Info

func (l *Logger) Info(action string, data ...lager.Data)

func (*Logger) Messages

func (l *Logger) Messages() []LoggerMessage

type LoggerMessage

type LoggerMessage struct {
	Action string
	Error  error
	Data   []lager.Data
}

type Reader

type Reader struct {
	ReadCall struct {
		Returns struct {
			Error error
		}
	}
}

func (*Reader) Read

func (r *Reader) Read([]byte) (int, error)

type ServiceDefiner

type ServiceDefiner struct {
	GenerateDefinitionsCall struct {
		Receives struct {
			Config config.Config
		}
		Returns struct {
			Definitions []config.ServiceDefinition
			Error       error
		}
	}

	WriteDefinitionsCall struct {
		Receives struct {
			Definitions []config.ServiceDefinition
			ConfigDir   string
		}
		Returns struct {
			Error error
		}
	}
}

func (*ServiceDefiner) GenerateDefinitions

func (d *ServiceDefiner) GenerateDefinitions(config config.Config) ([]config.ServiceDefinition, error)

func (*ServiceDefiner) WriteDefinitions

func (d *ServiceDefiner) WriteDefinitions(configDir string, definitions []config.ServiceDefinition) error

type StatusClient

type StatusClient struct {
	LeaderCall struct {
		Stub      func() (string, error)
		CallCount int
		Returns   struct {
			Leader string
			Error  error
		}
	}
}

func (*StatusClient) Leader

func (c *StatusClient) Leader() (string, error)

type Timeout

type Timeout struct{}

func (*Timeout) Done

func (t *Timeout) Done() <-chan struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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