1 Star 0 Fork 0

ryancartoon / sensu-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
restclient.go 463 Bytes
一键复制 编辑 原始数据 按行查看 历史
Cyril Cressent 提交于 2018-11-23 10:19 . Complete redesign of RBAC (#2338)
package mockclient
import (
"context"
"github.com/sensu/sensu-go/cli/client"
"github.com/sensu/sensu-go/cli/client/testing"
)
type testClientFactory struct {
client *testing.MockClient
}
func (r testClientFactory) NewWithContext(ctx context.Context) client.APIClient {
return r.client
}
func NewClientFactory() (*testing.MockClient, testClientFactory) {
client := testing.MockClient{}
factory := testClientFactory{&client}
return &client, factory
}
1
https://gitee.com/ryancartoon/sensu-go.git
git@gitee.com:ryancartoon/sensu-go.git
ryancartoon
sensu-go
sensu-go
v5.10.1

搜索帮助