import "istio.io/istio/tools/istio-iptables/pkg/dependencies"
implementation.go interface.go stub.go
type Dependencies interface { // RunOrFail runs a command and panics, if it fails RunOrFail(cmd string, args ...string) // Run runs a command Run(cmd string, args ...string) error // RunQuietlyAndIgnore runs a command quietly and ignores errors RunQuietlyAndIgnore(cmd string, args ...string) }
Dependencies is used as abstraction for the commands used from the operating system
type RealDependencies struct { }
RealDependencies implementation of interface Dependencies, which is used in production
func (r *RealDependencies) Run(cmd string, args ...string) error
Run runs a command
func (r *RealDependencies) RunOrFail(cmd string, args ...string)
RunOrFail runs a command and panics, if it fails
func (r *RealDependencies) RunQuietlyAndIgnore(cmd string, args ...string)
RunQuietlyAndIgnore runs a command quietly and ignores errors
type StdoutStubDependencies struct { }
StdoutStubDependencies implementation of interface Dependencies, which is used for testing
func (s *StdoutStubDependencies) Run(cmd string, args ...string) error
Run runs a command
func (s *StdoutStubDependencies) RunOrFail(cmd string, args ...string)
RunOrFail runs a command and panics, if it fails
func (s *StdoutStubDependencies) RunQuietlyAndIgnore(cmd string, args ...string)
RunQuietlyAndIgnore runs a command quietly and ignores errors
Package dependencies imports 4 packages (graph) and is imported by 2 packages. Updated 2020-12-19. Refresh now. Tools for package owners.