Skip to content

Commit

Permalink
Use knatve/pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
xu zhao committed Feb 12, 2019
1 parent 8d0e8d1 commit bca8c7b
Show file tree
Hide file tree
Showing 59 changed files with 1,105 additions and 320 deletions.
8 changes: 6 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ required = [
# TODO why is this overridden?
[[override]]
name = "github.com/knative/pkg"
# HEAD as of 2019-01-16
revision = "d3a9e54be7d4213b4018135d82b586de45f6a694"
# HEAD as of 2019-2-11
revision = "ac1f8182274a10bde23df8f964484bce87f06752"

[[constraint]]
name = "github.com/knative/serving"
Expand Down
2 changes: 1 addition & 1 deletion cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/logconfig"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
"github.com/knative/pkg/configmap"
"github.com/knative/pkg/logging"
Expand Down
2 changes: 1 addition & 1 deletion cmd/fanoutsidecar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/knative/eventing/pkg/sidecar/configmap/filesystem"
"github.com/knative/eventing/pkg/sidecar/configmap/watcher"
"github.com/knative/eventing/pkg/sidecar/swappable"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
"k8s.io/client-go/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/logconfig"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"

"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gcppubsub/pkg/controller/channel/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
util "github.com/knative/eventing/pkg/provisioners"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/knative/eventing/pkg/utils"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
"go.uber.org/zap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/cmd/dispatcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
provisionerController "github.com/knative/eventing/contrib/kafka/pkg/controller"
"github.com/knative/eventing/contrib/kafka/pkg/dispatcher"
"github.com/knative/eventing/pkg/sidecar/configmap/watcher"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/controller/channel/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

common "github.com/knative/eventing/contrib/kafka/pkg/controller"
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/controller/channel/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package channel
import (
"testing"

_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)

Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/controller/channel/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/knative/eventing/pkg/provisioners"
util "github.com/knative/eventing/pkg/provisioners"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/knative/eventing/pkg/utils"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/controller/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package controller
import (
"testing"

_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)

Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/controller/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
"github.com/knative/eventing/pkg/provisioners"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/controller/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
)

func TestGetProvisionerConfigBrokers(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/pkg/dispatcher/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/knative/eventing/pkg/provisioners"
"github.com/knative/eventing/pkg/sidecar/fanout"
"github.com/knative/eventing/pkg/sidecar/multichannelfanout"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
)

type mockConsumer struct {
Expand Down
2 changes: 1 addition & 1 deletion contrib/natss/pkg/controller/channel/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/knative/eventing/pkg/provisioners"
util "github.com/knative/eventing/pkg/provisioners"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/knative/eventing/pkg/utils"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
"github.com/knative/eventing/pkg/provisioners"
"github.com/knative/eventing/pkg/system"
_ "github.com/knative/eventing/pkg/system/testing"
"github.com/knative/pkg/system"
_ "github.com/knative/pkg/system/testing"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion contrib/natss/pkg/dispatcher/dispatcher/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/knative/eventing/pkg/apis/duck/v1alpha1"
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/provisioners"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/nats-io/nats-streaming-server/server"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion contrib/natss/pkg/stanutil/stanutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/knative/eventing/pkg/provisioners"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/nats-io/nats-streaming-server/server"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/channel_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/reconciler/names"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
"github.com/knative/eventing/pkg/utils"
"k8s.io/apimachinery/pkg/api/equality"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/channel_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/knative/eventing/pkg/utils"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/inmemory/channel/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package channel

import (
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/inmemory/channel/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/knative/eventing/pkg/sidecar/configmap"
"github.com/knative/eventing/pkg/sidecar/fanout"
"github.com/knative/eventing/pkg/sidecar/multichannelfanout"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/knative/eventing/pkg/utils"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
"go.uber.org/zap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
util "github.com/knative/eventing/pkg/provisioners"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
controllertesting "github.com/knative/eventing/pkg/reconciler/testing"
util "github.com/knative/eventing/pkg/provisioners"
"github.com/knative/eventing/pkg/system"
_ "github.com/knative/eventing/pkg/system/testing"
"github.com/knative/pkg/system"
_ "github.com/knative/pkg/system/testing"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/message_dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/message_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
"github.com/knative/eventing/pkg/utils"

"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/provisioner_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"fmt"

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/system"
"github.com/knative/pkg/logging"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/provisioners/provisioner_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/eventing/pkg/system"
_ "github.com/knative/eventing/pkg/system/testing"
"github.com/knative/pkg/system"
_ "github.com/knative/pkg/system/testing"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/provisioners/references_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"testing"

_ "github.com/knative/eventing/pkg/system/testing"
_ "github.com/knative/pkg/system/testing"
)

const (
Expand Down
11 changes: 0 additions & 11 deletions pkg/system/testing/names.go

This file was deleted.

3 changes: 1 addition & 2 deletions test/test_images/logevents/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"context"
"log"
"net/http"
"time"

"github.com/knative/pkg/cloudevents"
)
Expand All @@ -29,7 +28,7 @@ type Heartbeat struct {

func handler(ctx context.Context, data map[string]interface{}) {
metadata := cloudevents.FromContext(ctx)
log.Printf("[%s] %s %s: %+v", metadata.EventTime.Format(time.RFC3339), metadata.ContentType, metadata.Source, data)
log.Printf("[%s]: %+v", metadata.DataContentType(), data)
}

func main() {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bca8c7b

Please sign in to comment.