Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(135)

Delta Between Two Patch Sets: environs/interface.go

Issue 77820044: Add EnvironCapability to state.Policy
Left Patch Set: Add EnvironCapability to state.Policy Created 10 years ago
Right Patch Set: Add EnvironCapability to state.Policy Created 9 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « agent/bootstrap_test.go ('k') | environs/statepolicy.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2011, 2012, 2013 Canonical Ltd. 1 // Copyright 2011, 2012, 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package environs 4 package environs
5 5
6 import ( 6 import (
7 "io" 7 "io"
8 "os" 8 "os"
9 9
10 "launchpad.net/juju-core/constraints" 10 "launchpad.net/juju-core/constraints"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // attr1: val1 42 // attr1: val1
43 // ` 43 // `
44 // The text is used as a template (see the template package) with one ex tra template 44 // The text is used as a template (see the template package) with one ex tra template
45 // function available, rand, which expands to a random hexadecimal strin g when invoked. 45 // function available, rand, which expands to a random hexadecimal strin g when invoked.
46 BoilerplateConfig() string 46 BoilerplateConfig() string
47 47
48 // SecretAttrs filters the supplied configuration returning only values 48 // SecretAttrs filters the supplied configuration returning only values
49 // which are considered sensitive. All of the values of these secret 49 // which are considered sensitive. All of the values of these secret
50 // attributes need to be strings. 50 // attributes need to be strings.
51 SecretAttrs(cfg *config.Config) (map[string]string, error) 51 SecretAttrs(cfg *config.Config) (map[string]string, error)
52
53 // PublicAddress returns this machine's public host name.
54 PublicAddress() (string, error)
55
56 // PrivateAddress returns this machine's private host name.
57 PrivateAddress() (string, error)
58 } 52 }
59 53
60 // EnvironStorage implements storage access for an environment 54 // EnvironStorage implements storage access for an environment
61 type EnvironStorage interface { 55 type EnvironStorage interface {
62 // Storage returns storage specific to the environment. 56 // Storage returns storage specific to the environment.
63 Storage() storage.Storage 57 Storage() storage.Storage
64 } 58 }
65 59
66 // ConfigGetter implements access to an environment's configuration. 60 // ConfigGetter implements access to an environment's configuration.
67 type ConfigGetter interface { 61 type ConfigGetter interface {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 160 }
167 161
168 // BootstrapContext is an interface that is passed to 162 // BootstrapContext is an interface that is passed to
169 // Environ.Bootstrap, providing a means of obtaining 163 // Environ.Bootstrap, providing a means of obtaining
170 // information about and manipulating the context in which 164 // information about and manipulating the context in which
171 // it is being invoked. 165 // it is being invoked.
172 type BootstrapContext interface { 166 type BootstrapContext interface {
173 GetStdin() io.Reader 167 GetStdin() io.Reader
174 GetStdout() io.Writer 168 GetStdout() io.Writer
175 GetStderr() io.Writer 169 GetStderr() io.Writer
170 Infof(format string, params ...interface{})
171 Verbosef(format string, params ...interface{})
176 172
177 // InterruptNotify starts watching for interrupt signals 173 // InterruptNotify starts watching for interrupt signals
178 // on behalf of the caller, sending them to the supplied 174 // on behalf of the caller, sending them to the supplied
179 // channel. 175 // channel.
180 InterruptNotify(sig chan<- os.Signal) 176 InterruptNotify(sig chan<- os.Signal)
181 177
182 // StopInterruptNotify undoes the effects of a previous 178 // StopInterruptNotify undoes the effects of a previous
183 // call to InterruptNotify with the same channel. After 179 // call to InterruptNotify with the same channel. After
184 // StopInterruptNotify returns, no more signals will be 180 // StopInterruptNotify returns, no more signals will be
185 // delivered to the channel. 181 // delivered to the channel.
186 StopInterruptNotify(chan<- os.Signal) 182 StopInterruptNotify(chan<- os.Signal)
187 } 183 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b