当前位置: 首页>>代码示例>>Golang>>正文


Golang base.NewFacadeCaller函数代码示例

本文整理汇总了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),
	}
}
开发者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


注:本文中的github.com/juju/juju/api/base.NewFacadeCaller函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。