Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove obsolete cli flags #7467

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions ocis-pkg/service/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"

"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
)

Expand All @@ -22,7 +21,6 @@ type Options struct {
TLSCert string
TLSKey string
Context context.Context
Flags []cli.Flag
TraceProvider trace.TracerProvider
}

Expand Down Expand Up @@ -96,13 +94,6 @@ func Context(ctx context.Context) Option {
}
}

// Flags provides a function to set the flags option.
func Flags(flags ...cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, flags...)
}
}

// TraceProvider provides a function to set the trace provider option.
func TraceProvider(tp trace.TracerProvider) Option {
return func(o *Options) {
Expand Down
1 change: 0 additions & 1 deletion ocis-pkg/service/grpc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func NewServiceWithClient(client client.Client, opts ...Option) (Service, error)
micro.Name(strings.Join([]string{sopts.Namespace, sopts.Name}, ".")),
micro.Version(sopts.Version),
micro.Context(sopts.Context),
micro.Flags(sopts.Flags...),
micro.Registry(registry.GetRegistry()),
micro.RegisterTTL(time.Second * 30),
micro.RegisterInterval(time.Second * 10),
Expand Down
9 changes: 0 additions & 9 deletions services/eventhistory/pkg/server/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/eventhistory/pkg/config"
"github.com/owncloud/ocis/v2/services/eventhistory/pkg/metrics"
"github.com/urfave/cli/v2"
"go-micro.dev/v4/store"
"go.opentelemetry.io/otel/trace"
)
Expand All @@ -24,7 +23,6 @@ type Options struct {
Config *config.Config
Metrics *metrics.Metrics
Namespace string
Flags []cli.Flag
Persistence store.Store
Consumer events.Consumer
TraceProvider trace.TracerProvider
Expand Down Expand Up @@ -90,13 +88,6 @@ func Namespace(val string) Option {
}
}

// Flags provides a function to set the flags option.
func Flags(flags []cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, flags...)
}
}

// Persistence provides a function to configure the store
func Persistence(store store.Store) Option {
return func(o *Options) {
Expand Down
1 change: 0 additions & 1 deletion services/eventhistory/pkg/server/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func NewService(opts ...Option) grpc.Service {
grpc.Version(version.GetString()),
grpc.Address(options.Address),
grpc.Context(options.Context),
grpc.Flags(options.Flags...),
grpc.Version(version.GetString()),
grpc.TraceProvider(options.TraceProvider),
)
Expand Down
9 changes: 0 additions & 9 deletions services/search/pkg/server/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/owncloud/ocis/v2/services/search/pkg/config"
"github.com/owncloud/ocis/v2/services/search/pkg/metrics"
svc "github.com/owncloud/ocis/v2/services/search/pkg/service/grpc/v0"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
)

Expand All @@ -21,7 +20,6 @@ type Options struct {
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
Handler *svc.Service
JWTSecret string
TraceProvider trace.TracerProvider
Expand Down Expand Up @@ -73,13 +71,6 @@ func Metrics(val *metrics.Metrics) Option {
}
}

// Flags provides a function to set the flags option.
func Flags(val []cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, val...)
}
}

// Handler provides a function to set the handler option.
func Handler(val *svc.Service) Option {
return func(o *Options) {
Expand Down
1 change: 0 additions & 1 deletion services/search/pkg/server/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func Server(opts ...Option) (grpc.Service, func(), error) {
grpc.Address(options.Config.GRPC.Addr),
grpc.Namespace(options.Config.GRPC.Namespace),
grpc.Logger(options.Logger),
grpc.Flags(options.Flags...),
grpc.Version(version.GetString()),
grpc.TraceProvider(options.TraceProvider),
)
Expand Down
9 changes: 0 additions & 9 deletions services/settings/pkg/server/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/owncloud/ocis/v2/services/settings/pkg/config"
"github.com/owncloud/ocis/v2/services/settings/pkg/metrics"
"github.com/owncloud/ocis/v2/services/settings/pkg/settings"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
)

Expand All @@ -22,7 +21,6 @@ type Options struct {
Config *config.Config
Metrics *metrics.Metrics
ServiceHandler settings.ServiceHandler
Flags []cli.Flag
TraceProvider trace.TracerProvider
}

Expand Down Expand Up @@ -72,13 +70,6 @@ func Metrics(val *metrics.Metrics) Option {
}
}

// Flags provides a function to set the flags option.
func Flags(val []cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, val...)
}
}

// ServiceHandler provides a function to set the ServiceHandler option
func ServiceHandler(val settings.ServiceHandler) Option {
return func(o *Options) {
Expand Down
1 change: 0 additions & 1 deletion services/settings/pkg/server/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func Server(opts ...Option) grpc.Service {
grpc.Address(options.Config.GRPC.Addr),
grpc.Namespace(options.Config.GRPC.Namespace),
grpc.Context(options.Context),
grpc.Flags(options.Flags...),
grpc.TraceProvider(options.TraceProvider),
)
if err != nil {
Expand Down
9 changes: 0 additions & 9 deletions services/store/pkg/server/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/store/pkg/config"
"github.com/owncloud/ocis/v2/services/store/pkg/metrics"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
)

Expand All @@ -20,7 +19,6 @@ type Options struct {
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
TraceProvider trace.TracerProvider
}

Expand Down Expand Up @@ -70,13 +68,6 @@ func Metrics(val *metrics.Metrics) Option {
}
}

// Flags provides a function to set the flags option.
func Flags(val []cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, val...)
}
}

// TraceProvider provides a function to configure the trace provider
func TraceProvider(traceProvider trace.TracerProvider) Option {
return func(o *Options) {
Expand Down
1 change: 0 additions & 1 deletion services/store/pkg/server/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func Server(opts ...Option) grpc.Service {
grpc.Context(options.Context),
grpc.Address(options.Config.GRPC.Addr),
grpc.Logger(options.Logger),
grpc.Flags(options.Flags...),
grpc.TraceProvider(options.TraceProvider),
)
if err != nil {
Expand Down
9 changes: 0 additions & 9 deletions services/thumbnails/pkg/server/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/thumbnails/pkg/config"
"github.com/owncloud/ocis/v2/services/thumbnails/pkg/metrics"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
)

Expand All @@ -22,7 +21,6 @@ type Options struct {
Config *config.Config
Metrics *metrics.Metrics
Namespace string
Flags []cli.Flag
TraceProvider trace.TracerProvider
}

Expand Down Expand Up @@ -86,13 +84,6 @@ func Namespace(val string) Option {
}
}

// Flags provides a function to set the flags option.
func Flags(flags []cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, flags...)
}
}

// TraceProvider provides a function to set the TraceProvider option
func TraceProvider(val trace.TracerProvider) Option {
return func(o *Options) {
Expand Down
1 change: 0 additions & 1 deletion services/thumbnails/pkg/server/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func NewService(opts ...Option) grpc.Service {
grpc.Version(version.GetString()),
grpc.Address(options.Address),
grpc.Context(options.Context),
grpc.Flags(options.Flags...),
grpc.Version(version.GetString()),
grpc.TraceProvider(options.TraceProvider),
)
Expand Down