本文整理汇总了Golang中github.com/juju/juju/api/base.NewFacadeCaller函数的典型用法代码示例。如果您正苦于以下问题:Golang NewFacadeCaller函数的具体用法?Golang NewFacadeCaller怎么用?Golang NewFacadeCaller使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewFacadeCaller函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: NewState
// NewState returns a version of the state that provides functionality
// required by agent code.
func NewState(caller base.APICaller) *State {
facadeCaller := base.NewFacadeCaller(caller, "Agent")
return &State{
facade: facadeCaller,
ModelWatcher: common.NewModelWatcher(facadeCaller),
}
}
开发者ID:exekias,项目名称:juju,代码行数:9,代码来源:state.go
示例2: NewState
// NewState creates a new client-side Machiner facade.
func NewState(caller base.APICaller) *State {
facadeCaller := base.NewFacadeCaller(caller, provisionerFacade)
return &State{
ModelWatcher: common.NewModelWatcher(facadeCaller),
APIAddresser: common.NewAPIAddresser(facadeCaller),
facade: facadeCaller}
}
开发者ID:AlexisBruemmer,项目名称:juju,代码行数:8,代码来源:provisioner.go
示例3: NewState
// NewState creates a new client-side Firewaller facade.
func NewState(caller base.APICaller) *State {
facadeCaller := base.NewFacadeCaller(caller, firewallerFacade)
return &State{
facade: facadeCaller,
EnvironWatcher: common.NewEnvironWatcher(facadeCaller),
}
}
开发者ID:kapilt,项目名称:juju,代码行数:8,代码来源:firewaller.go
示例4: NewFacade
// NewFacade returns a Facade backed by the supplied api caller.
func NewFacade(apiCaller base.APICaller, newWatcher NewWatcherFunc) *Facade {
facadeCaller := base.NewFacadeCaller(apiCaller, "MigrationFlag")
return &Facade{
caller: facadeCaller,
newWatcher: newWatcher,
}
}
开发者ID:makyo,项目名称:juju,代码行数:8,代码来源:facade.go
示例5: NewFacade
// NewFacade returns a new api client facade instance.
func NewFacade(caller base.APICaller) *Facade {
facadeCaller := base.NewFacadeCaller(caller, apiName)
return &Facade{
EnvironWatcher: common.NewEnvironWatcher(facadeCaller),
ToolsVersionUpdater: NewToolsVersionUpdater(facadeCaller),
}
}
开发者ID:imoapps,项目名称:juju,代码行数:8,代码来源:environment.go
示例6: NewState
// NewState returns a version of the state that provides functionality
// required by the reboot worker.
func NewState(caller base.APICaller, machineTag names.MachineTag) *State {
return &State{
facade: base.NewFacadeCaller(caller, "Reboot"),
machineTag: machineTag,
}
}
开发者ID:Pankov404,项目名称:juju,代码行数:9,代码来源:reboot.go
示例7: NewState
// NewState creates a new client-side Firewaller API facade.
func NewState(caller base.APICaller) *State {
facadeCaller := base.NewFacadeCaller(caller, firewallerFacade)
return &State{
facade: facadeCaller,
ModelWatcher: common.NewModelWatcher(facadeCaller),
CloudSpecAPI: cloudspec.NewCloudSpecAPI(facadeCaller),
}
}
开发者ID:bac,项目名称:juju,代码行数:9,代码来源:firewaller.go
示例8: NewAPI
// NewAPI creates a new client-side Addresser facade.
func NewAPI(caller base.APICaller) *API {
if caller == nil {
panic("caller is nil")
}
return &API{
facade: base.NewFacadeCaller(caller, addresserFacade),
}
}
开发者ID:felicianotech,项目名称:juju,代码行数:9,代码来源:addresser.go
示例9: NewState
// NewState creates a new client-side Machiner facade.
func NewState(caller base.APICaller) *State {
facadeCaller := base.NewFacadeCaller(caller, machinerFacade)
return &State{
facade: facadeCaller,
APIAddresser: common.NewAPIAddresser(facadeCaller),
}
}
开发者ID:bac,项目名称:juju,代码行数:9,代码来源:machiner.go
示例10: NewState
// NewState creates a new client-side Uniter facade.
func NewState(caller base.APICaller, authTag names.UnitTag) *State {
facadeCaller := base.NewFacadeCaller(caller, uniterFacade)
return &State{
EnvironWatcher: common.NewEnvironWatcher(facadeCaller),
APIAddresser: common.NewAPIAddresser(facadeCaller),
facade: facadeCaller,
unitTag: authTag,
}
}
开发者ID:kapilt,项目名称:juju,代码行数:10,代码来源:uniter.go
示例11: NewAPI
// NewAPI creates a new facade.
func NewAPI(caller base.APICaller) *API {
if caller == nil {
panic("caller is nil")
}
facadeCaller := base.NewFacadeCaller(caller, discoverspacesFacade)
return &API{
facade: facadeCaller,
}
}
开发者ID:OSBI,项目名称:juju,代码行数:10,代码来源:discoverspaces.go
示例12: NewState
// NewState returns a version of the state that provides functionality
// required by agent code.
func NewState(caller base.APICaller) *State {
facadeCaller := base.NewFacadeCaller(caller, "Agent")
return &State{
facade: facadeCaller,
ModelWatcher: common.NewModelWatcher(facadeCaller),
CloudSpecAPI: cloudspec.NewCloudSpecAPI(facadeCaller),
ControllerConfigAPI: common.NewControllerConfig(facadeCaller),
}
}
开发者ID:bac,项目名称:juju,代码行数:11,代码来源:state.go
示例13: newLastSentTracker
func newLastSentTracker(sink string, caller base.APICaller) *lastSentTracker {
client := logfwdapi.NewLastSentClient(func(name string) logfwdapi.FacadeCaller {
return base.NewFacadeCaller(caller, name)
})
return &lastSentTracker{
sink: sink,
client: client,
}
}
开发者ID:bac,项目名称:juju,代码行数:9,代码来源:tracker.go
示例14: NewAPI
// NewAPI creates a new client-side InstancePoller facade.
func NewAPI(caller base.APICaller) *API {
if caller == nil {
panic("caller is nil")
}
facadeCaller := base.NewFacadeCaller(caller, instancePollerFacade)
return &API{
EnvironWatcher: common.NewEnvironWatcher(facadeCaller),
facade: facadeCaller,
}
}
开发者ID:felicianotech,项目名称:juju,代码行数:11,代码来源:instancepoller.go
示例15: NewState
// NewState creates a new client-side StorageProvisioner facade.
func NewState(caller base.APICaller, scope names.Tag) (*State, error) {
switch scope.(type) {
case names.ModelTag:
case names.MachineTag:
default:
return nil, errors.Errorf("expected ModelTag or MachineTag, got %T", scope)
}
facadeCaller := base.NewFacadeCaller(caller, storageProvisionerFacade)
return &State{facadeCaller, scope}, nil
}
开发者ID:bac,项目名称:juju,代码行数:11,代码来源:provisioner.go
示例16: NewClient
// NewClient creates a new client for accessing the metricsmanager api
func NewClient(apiCaller base.APICaller) (*Client, error) {
modelTag, err := apiCaller.ModelTag()
if err != nil {
return nil, errors.Trace(err)
}
facade := base.NewFacadeCaller(apiCaller, "MetricsManager")
return &Client{
modelTag: modelTag,
facade: facade,
}, nil
}
开发者ID:exekias,项目名称:juju,代码行数:12,代码来源:client.go
示例17: NewClient
// NewClient creates a new client for accessing the undertaker API.
func NewClient(caller base.APICaller, newWatcher NewWatcherFunc) (*Client, error) {
modelTag, ok := caller.ModelTag()
if !ok {
return nil, errors.New("undertaker client is not appropriate for controller-only API")
}
return &Client{
modelTag: modelTag,
caller: base.NewFacadeCaller(caller, "Undertaker"),
newWatcher: newWatcher,
}, nil
}
开发者ID:bac,项目名称:juju,代码行数:12,代码来源:undertaker.go
示例18: NewClient
// NewClient creates a new client for accessing the undertaker API.
func NewClient(caller base.APICaller, newWatcher NewWatcherFunc) (*Client, error) {
modelTag, err := caller.ModelTag()
if err != nil {
return nil, errors.Trace(err)
}
return &Client{
modelTag: modelTag,
caller: base.NewFacadeCaller(caller, "Undertaker"),
newWatcher: newWatcher,
}, nil
}
开发者ID:makyo,项目名称:juju,代码行数:12,代码来源:undertaker.go
示例19: NewAPI
// NewAPI creates a new client-side machine undertaker facade.
func NewAPI(caller base.APICaller, newWatcher NewWatcherFunc) (*API, error) {
modelTag, ok := caller.ModelTag()
if !ok {
return nil, errors.New("machine undertaker client requires a model API connection")
}
api := API{
facade: base.NewFacadeCaller(caller, "MachineUndertaker"),
modelTag: modelTag,
newWatcher: newWatcher,
}
return &api, nil
}
开发者ID:bac,项目名称:juju,代码行数:13,代码来源:undertaker.go
示例20: NewClient
// NewClient creates a new client for accessing the metricsmanager api
func NewClient(apiCaller base.APICaller) (*Client, error) {
modelTag, ok := apiCaller.ModelTag()
if !ok {
return nil, errors.New("metricsmanager client is not appropriate for controller-only API")
}
facade := base.NewFacadeCaller(apiCaller, "MetricsManager")
return &Client{
modelTag: modelTag,
facade: facade,
}, nil
}
开发者ID:bac,项目名称:juju,代码行数:13,代码来源:client.go
注:本文中的github.com/juju/juju/api/base.NewFacadeCaller函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论