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

misc: use github.com/grafana/river #4949

Merged
merged 3 commits into from
Aug 28, 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
2 changes: 1 addition & 1 deletion cmd/internal/flowmode/cmd_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/grafana/agent/converter"
convert_diag "github.com/grafana/agent/converter/diag"
"github.com/grafana/agent/pkg/river/diag"
"github.com/grafana/river/diag"
)

func convertCommand() *cobra.Command {
Expand Down
6 changes: 3 additions & 3 deletions cmd/internal/flowmode/cmd_fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/spf13/cobra"

"github.com/grafana/agent/pkg/river/diag"
"github.com/grafana/agent/pkg/river/parser"
"github.com/grafana/agent/pkg/river/printer"
"github.com/grafana/river/diag"
"github.com/grafana/river/parser"
"github.com/grafana/river/printer"
)

func fmtCommand() *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/flowmode/cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import (
"github.com/grafana/agent/pkg/flow"
"github.com/grafana/agent/pkg/flow/logging"
"github.com/grafana/agent/pkg/flow/tracing"
"github.com/grafana/agent/pkg/river/diag"
"github.com/grafana/agent/pkg/usagestats"
"github.com/grafana/agent/service"
"github.com/grafana/agent/service/cluster"
httpservice "github.com/grafana/agent/service/http"
uiservice "github.com/grafana/agent/service/ui"
"github.com/grafana/ckit/peer"
"github.com/grafana/river/diag"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cobra"
"go.opentelemetry.io/otel"
Expand Down
2 changes: 1 addition & 1 deletion component/common/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/url"
"strings"

"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
"github.com/prometheus/common/config"
)

Expand Down
2 changes: 1 addition & 1 deletion component/common/config/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"testing"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/common/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package kubernetes
import (
"testing"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/common/net/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
weaveworks "github.com/weaveworks/common/server"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
)

// testArguments mimics an arguments type used by a component, applying the defaults to ServerConfig
Expand Down
2 changes: 1 addition & 1 deletion component/common/relabel/relabel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
)

func TestParseConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion component/component_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/grafana/agent/pkg/river/encoding/riverjson"
"github.com/grafana/river/encoding/riverjson"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/aws/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
promcfg "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
promaws "github.com/prometheus/prometheus/discovery/aws"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/aws/lightsail.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
promcfg "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
promaws "github.com/prometheus/prometheus/discovery/aws"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
common "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
prom_discovery "github.com/prometheus/prometheus/discovery/azure"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/azure/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
"gotest.tools/assert"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/consul/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
config_util "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
prom_discovery "github.com/prometheus/prometheus/discovery/consul"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/consul/consul_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package consul
import (
"testing"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/discovery/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
"github.com/prometheus/common/model"
prom_discovery "github.com/prometheus/prometheus/discovery/digitalocean"
)
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/digitalocean/digitalocean_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
prom_common_config "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/dns/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
"gotest.tools/assert"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package docker
import (
"testing"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions component/discovery/eureka/eureka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"time"

"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river"
"github.com/grafana/river/rivertypes"
promcfg "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
prom_sd "github.com/prometheus/prometheus/discovery/eureka"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/gce/gce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/discovery/hetzner/hetzner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
"gotest.tools/assert"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
"go.uber.org/atomic"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/kubelet/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/discovery/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package kubernetes
import (
"testing"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/discovery/nomad/nomad_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
"gotest.tools/assert"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
config_util "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
prom_discovery "github.com/prometheus/prometheus/discovery/openstack"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/openstack/openstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/discovery/openstack"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/puppetdb/puppetdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
"gotest.tools/assert"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/relabel/relabel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/component/discovery/relabel"
"github.com/grafana/agent/pkg/flow/componenttest"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/discovery/uyuni/uyuni.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
promcfg "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
prom_discovery "github.com/prometheus/prometheus/discovery/uyuni"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/uyuni/uyuni_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
promcfg "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion component/local/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
)

// waitReadPeriod holds the time to wait before reading a file while the
Expand Down
2 changes: 1 addition & 1 deletion component/local/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/grafana/agent/component/local/file"
"github.com/grafana/agent/pkg/flow/componenttest"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/grafana/agent/component/loki/process/stages"
lsf "github.com/grafana/agent/component/loki/source/file"
"github.com/grafana/agent/pkg/flow/componenttest"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/agent/pkg/util"
"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/river"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/agent/pkg/util"
"github.com/grafana/river"
)

var testJSONRiverSingleStageWithoutSource = `
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/loki/pkg/logproto"
util_log "github.com/grafana/loki/pkg/util/log"
"github.com/grafana/river"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/relabel/relabel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/grafana/agent/component/discovery"
lsf "github.com/grafana/agent/component/loki/source/file"
"github.com/grafana/agent/pkg/flow/componenttest"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/agent/pkg/util"
"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/river"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/relabel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/grafana/agent/component/common/loki/client/fake"
fnet "github.com/grafana/agent/component/common/net"
frelabel "github.com/grafana/agent/component/common/relabel"
"github.com/grafana/agent/pkg/river"
"github.com/grafana/dskit/flagext"
"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/river"
"github.com/phayes/freeport"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package azure_event_hubs
import (
"testing"

"github.com/grafana/agent/pkg/river"
"github.com/grafana/river"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/source/cloudflare/cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/agent/component/common/loki/positions"
cft "github.com/grafana/agent/component/loki/source/cloudflare/internal/cloudflaretarget"
"github.com/grafana/agent/pkg/river/rivertypes"
"github.com/grafana/river/rivertypes"
"github.com/prometheus/common/model"
)

Expand Down
Loading