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

Event lineage builder should accept client interfaces #8402

Merged
Merged
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
16 changes: 8 additions & 8 deletions pkg/graph/constructor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ type ConstructorConfig struct {
// regardless of the Lenient setting.
Lenient bool

EventingClient *eventingclient.Clientset
DynamicClient *dynamic.DynamicClient
EventingClient eventingclient.Interface
DynamicClient dynamic.Interface
Namespaces []string
ShouldAddBroker func(b eventingv1.Broker) bool
FetchBrokers bool
Expand Down Expand Up @@ -98,7 +98,7 @@ func ConstructGraph(ctx context.Context, config ConstructorConfig, logger zap.Lo
return g, nil
}

func (g *Graph) fetchBrokers(ctx context.Context, config ConstructorConfig, eventingClient *eventingclient.Clientset, logger zap.Logger) error {
func (g *Graph) fetchBrokers(ctx context.Context, config ConstructorConfig, eventingClient eventingclient.Interface, logger zap.Logger) error {
if !config.FetchBrokers {
return nil
}
Expand Down Expand Up @@ -132,7 +132,7 @@ func (g *Graph) fetchBrokers(ctx context.Context, config ConstructorConfig, even
return nil
}

func (g *Graph) fetchChannels(ctx context.Context, config ConstructorConfig, eventingClient *eventingclient.Clientset, logger zap.Logger) error {
func (g *Graph) fetchChannels(ctx context.Context, config ConstructorConfig, eventingClient eventingclient.Interface, logger zap.Logger) error {
if !config.FetchChannels {
return nil
}
Expand Down Expand Up @@ -166,7 +166,7 @@ func (g *Graph) fetchChannels(ctx context.Context, config ConstructorConfig, eve
return nil
}

func (g *Graph) fetchSources(ctx context.Context, config ConstructorConfig, _ *eventingclient.Clientset, logger zap.Logger) error {
func (g *Graph) fetchSources(ctx context.Context, config ConstructorConfig, _ eventingclient.Interface, logger zap.Logger) error {
if !config.FetchSources {
return nil
}
Expand All @@ -185,7 +185,7 @@ func (g *Graph) fetchSources(ctx context.Context, config ConstructorConfig, _ *e
return nil
}

func (g *Graph) fetchTriggers(ctx context.Context, config ConstructorConfig, eventingClient *eventingclient.Clientset, logger zap.Logger) error {
func (g *Graph) fetchTriggers(ctx context.Context, config ConstructorConfig, eventingClient eventingclient.Interface, logger zap.Logger) error {
if !config.FetchTriggers {
return nil
}
Expand Down Expand Up @@ -222,7 +222,7 @@ func (g *Graph) fetchTriggers(ctx context.Context, config ConstructorConfig, eve
return nil
}

func (g *Graph) fetchSubscriptions(ctx context.Context, config ConstructorConfig, eventingClient *eventingclient.Clientset, logger zap.Logger) error {
func (g *Graph) fetchSubscriptions(ctx context.Context, config ConstructorConfig, eventingClient eventingclient.Interface, logger zap.Logger) error {
if !config.FetchSubscriptions {
return nil
}
Expand Down Expand Up @@ -259,7 +259,7 @@ func (g *Graph) fetchSubscriptions(ctx context.Context, config ConstructorConfig
return nil
}

func (g *Graph) fetchEventTypes(ctx context.Context, config ConstructorConfig, eventingClient *eventingclient.Clientset, logger zap.Logger) error {
func (g *Graph) fetchEventTypes(ctx context.Context, config ConstructorConfig, eventingClient eventingclient.Interface, logger zap.Logger) error {
if !config.FetchEventTypes {
return nil
}
Expand Down
Loading