本文整理汇总了Golang中github.com/juju/juju/api/base.NewFacadeCaller函数的典型用法代码示例。如果您正苦于以下问题:Golang NewFacadeCaller函数的具体用法?Golang NewFacadeCaller怎么用?Golang NewFacadeCaller使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewFacadeCaller函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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),
}
}
示例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}
}
示例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),
}
}
示例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,
}
}
示例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),
}
}
示例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,
}
}
示例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),
}
}
示例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),
}
}
示例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),
}
}
示例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,
}
}
示例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,
}
}
示例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),
}
}
示例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,
}
}
示例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,
}
}
示例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
}