Other(refactor): Remove unused frontend args

This commit is contained in:
James Houlahan
2022-08-18 15:03:04 +02:00
committed by Jakub
parent aa5c3042da
commit 743a2f8dac
4 changed files with 8 additions and 21 deletions

View File

@ -24,6 +24,7 @@
// - event listener // - event listener
// - credentials store // - credentials store
// - pmapi Manager // - pmapi Manager
//
// In addition, the base initialises logging and reacts to command line arguments // In addition, the base initialises logging and reacts to command line arguments
// which control the log verbosity and enable cpu/memory profiling. // which control the log verbosity and enable cpu/memory profiling.
package base package base

View File

@ -156,9 +156,6 @@ func mailLoop(b *base.Base, c *cli.Context) error { //nolint:funlen
} }
f := frontend.New( f := frontend.New(
constants.Version,
constants.BuildVersion,
b.Name,
frontendMode, frontendMode,
!c.Bool(base.FlagNoWindow), !c.Bool(base.FlagNoWindow),
b.CrashHandler, b.CrashHandler,

View File

@ -42,9 +42,6 @@ type Frontend interface {
// New returns initialized frontend based on `frontendType`, which can be `cli` or `grpc`. // New returns initialized frontend based on `frontendType`, which can be `cli` or `grpc`.
func New( func New(
version,
buildVersion,
programName,
frontendType string, frontendType string,
showWindowOnStart bool, showWindowOnStart bool,
panicHandler types.PanicHandler, panicHandler types.PanicHandler,
@ -62,8 +59,6 @@ func New(
switch frontendType { switch frontendType {
case "grpc": case "grpc":
return grpc.NewService( return grpc.NewService(
version,
programName,
showWindowOnStart, showWindowOnStart,
panicHandler, panicHandler,
tls, tls,

View File

@ -52,8 +52,6 @@ type Service struct { // nolint:structcheck
eventStreamCh chan *StreamEvent eventStreamCh chan *StreamEvent
eventStreamDoneCh chan struct{} eventStreamDoneCh chan struct{}
programName string
programVersion string
panicHandler types.PanicHandler panicHandler types.PanicHandler
tls *bridgetls.TLS tls *bridgetls.TLS
locations *locations.Locations locations *locations.Locations
@ -77,8 +75,6 @@ type Service struct { // nolint:structcheck
// NewService returns a new instance of the service. // NewService returns a new instance of the service.
func NewService( func NewService(
version,
programName string,
showOnStartup bool, showOnStartup bool,
panicHandler types.PanicHandler, panicHandler types.PanicHandler,
tls *bridgetls.TLS, tls *bridgetls.TLS,
@ -94,8 +90,6 @@ func NewService(
) *Service { ) *Service {
s := Service{ s := Service{
UnimplementedBridgeServer: UnimplementedBridgeServer{}, UnimplementedBridgeServer: UnimplementedBridgeServer{},
programName: programName,
programVersion: version,
panicHandler: panicHandler, panicHandler: panicHandler,
tls: tls, tls: tls,
locations: locations, locations: locations,