Skip to content

Commit

Permalink
update libyavirt (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang0 authored Jul 25, 2023
1 parent 8217929 commit a71636d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/projecteru2/core v0.0.0-20230515031536-7fdaea78417e
github.com/projecteru2/libyavirt v0.0.0-20230514051104-0d756894b738
github.com/projecteru2/libyavirt v0.0.0-20230725071905-9785e974d625
github.com/prometheus/client_golang v1.15.0
github.com/rs/zerolog v1.29.1
github.com/shirou/gopsutil v3.21.11+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/projecteru2/core v0.0.0-20230515031536-7fdaea78417e h1:7gx3ZANhgXc3yPjecJi/dPhZrOh3LGjn8SI/VK4siQY=
github.com/projecteru2/core v0.0.0-20230515031536-7fdaea78417e/go.mod h1:H7AOnfGM0xI7hYMLG8JpqRVCI+flEX2w/Ro29zSwrQw=
github.com/projecteru2/libyavirt v0.0.0-20230514051104-0d756894b738 h1:hX9chCbN+i5dbonLgzCBuWJX99kRCSnOC8vlXs+Wb3s=
github.com/projecteru2/libyavirt v0.0.0-20230514051104-0d756894b738/go.mod h1:N41KaKmqbailweGs4x/mt2H0O0Y7MizObZQ+igLdzpw=
github.com/projecteru2/libyavirt v0.0.0-20230725071905-9785e974d625 h1:liDnxQ0JxvOLC0/tUVRlz4tG9r/xbcp1NXgNVNBJsLQ=
github.com/projecteru2/libyavirt v0.0.0-20230725071905-9785e974d625/go.mod h1:N41KaKmqbailweGs4x/mt2H0O0Y7MizObZQ+igLdzpw=
github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM=
github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
Expand Down
6 changes: 5 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/projecteru2/agent/version"
coreutils "github.com/projecteru2/core/utils"
yavirtclient "github.com/projecteru2/libyavirt/client"
yavirttypes "github.com/projecteru2/libyavirt/types"

engineapi "github.com/docker/docker/client"
"github.com/projecteru2/core/log"
Expand All @@ -34,7 +35,10 @@ func MakeDockerClient(config *types.Config) (*engineapi.Client, error) {

// MakeYavirtClient make a yavirt client
func MakeYavirtClient(config *types.Config) (yavirtclient.Client, error) {
return yavirtclient.New(config.Yavirt.Endpoint)
yCfg := &yavirttypes.Config{
URI: config.Yavirt.Endpoint,
}
return yavirtclient.New(yCfg)
}

// WritePid write pid
Expand Down

0 comments on commit a71636d

Please sign in to comment.