diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/entities/engine.go | 33 | ||||
-rw-r--r-- | pkg/terminal/util.go | 4 | ||||
-rw-r--r-- | pkg/tracing/tracing.go | 29 |
3 files changed, 15 insertions, 51 deletions
diff --git a/pkg/domain/entities/engine.go b/pkg/domain/entities/engine.go index f23d964e5..af996ad1e 100644 --- a/pkg/domain/entities/engine.go +++ b/pkg/domain/entities/engine.go @@ -1,11 +1,7 @@ package entities import ( - "context" - "io" - "github.com/containers/common/pkg/config" - "github.com/opentracing/opentracing-go" "github.com/spf13/pflag" ) @@ -37,22 +33,19 @@ type PodmanConfig struct { *config.Config *pflag.FlagSet - CGroupUsage string // rootless code determines Usage message - ConmonPath string // --conmon flag will set Engine.ConmonPath - CPUProfile string // Hidden: Should CPU profile be taken - EngineMode EngineMode // ABI or Tunneling mode - Identity string // ssh identity for connecting to server - MaxWorks int // maximum number of parallel threads - RegistriesConf string // allows for specifying a custom registries.conf - Remote bool // Connection to Podman API Service will use RESTful API - RuntimePath string // --runtime flag will set Engine.RuntimePath - RuntimeFlags []string // global flags for the container runtime - Span opentracing.Span // tracing object - SpanCloser io.Closer // Close() for tracing object - SpanCtx context.Context // context to use when tracing - Syslog bool // write to StdOut and Syslog, not supported when tunneling - Trace bool // Hidden: Trace execution - URI string // URI to RESTful API Service + CGroupUsage string // rootless code determines Usage message + ConmonPath string // --conmon flag will set Engine.ConmonPath + CPUProfile string // Hidden: Should CPU profile be taken + EngineMode EngineMode // ABI or Tunneling mode + Identity string // ssh identity for connecting to server + MaxWorks int // maximum number of parallel threads + RegistriesConf string // allows for specifying a custom registries.conf + Remote bool // Connection to Podman API Service will use RESTful API + RuntimePath string // --runtime flag will set Engine.RuntimePath + RuntimeFlags []string // global flags for the container runtime + Syslog bool // write to StdOut and Syslog, not supported when tunneling + Trace bool // Hidden: Trace execution + URI string // URI to RESTful API Service Runroot string StorageDriver string diff --git a/pkg/terminal/util.go b/pkg/terminal/util.go index 231b47974..04e12f6b3 100644 --- a/pkg/terminal/util.go +++ b/pkg/terminal/util.go @@ -10,11 +10,11 @@ import ( "path/filepath" "sync" + "github.com/containers/storage/pkg/homedir" "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/knownhosts" "golang.org/x/crypto/ssh/terminal" - "k8s.io/client-go/util/homedir" ) var ( @@ -105,7 +105,7 @@ func ReadLogin() []byte { func HostKey(host string) ssh.PublicKey { // parse OpenSSH known_hosts file // ssh or use ssh-keyscan to get initial key - knownHosts := filepath.Join(homedir.HomeDir(), ".ssh", "known_hosts") + knownHosts := filepath.Join(homedir.Get(), ".ssh", "known_hosts") fd, err := os.Open(knownHosts) if err != nil { logrus.Error(err) diff --git a/pkg/tracing/tracing.go b/pkg/tracing/tracing.go deleted file mode 100644 index 5be24faaa..000000000 --- a/pkg/tracing/tracing.go +++ /dev/null @@ -1,29 +0,0 @@ -package tracing - -import ( - "fmt" - "io" - - "github.com/opentracing/opentracing-go" - "github.com/uber/jaeger-client-go" - "github.com/uber/jaeger-client-go/config" -) - -// Init returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout. -func Init(service string) (opentracing.Tracer, io.Closer) { - cfg := &config.Configuration{ - ServiceName: service, - Sampler: &config.SamplerConfig{ - Type: "const", - Param: 1, - }, - Reporter: &config.ReporterConfig{ - LogSpans: true, - }, - } - tracer, closer, err := cfg.NewTracer(config.Logger(jaeger.StdLogger)) - if err != nil { - panic(fmt.Sprintf("ERROR: cannot init Jaeger: %v\n", err)) - } - return tracer, closer -} |