I'm not yet pushing up changes because I don't want to write more code
that is going to get argued over until we have a consensus on api/params
return types and the interface name.
https://codereview.appspot.com/29990045/diff/1/state/address.go#newcode116
state/address.go:116:
On 2013/11/22 00:46:52, wallyworld wrote:
> I think it's worth making this function return a struct.
> Since we are now returning a hodge podge of values, perhaps a better
method name
> is required
> eg DeployerAddressInfo or DeployerConnectionInfo
> I also think it may be worth naming this method to be the same as the
one on
> state, which is currently ServerAddresses().
https://codereview.appspot.com/29990045/diff/1/state/api/params/params.go#newcode526
state/api/params/params.go:526:
On 2013/11/21 05:17:42, axw wrote:
> I know I'm being pedantic, but a port isn't exactly an address.
Multiple API
> calls isn't great, though. It would be nice if we could make bulk
calls of an
> arbitrary sequence of API methods.
> +1
> params.ServerAddressesResults does not belong here. No api params
structs should
> escape the api infrastructure
OK, I disagree here on two fronts.
Firstly this interface should be renamed to have something to do with
the API. It defines the API methods that it calls.
Secondly there is already precedence for exporting api/params structures
as return parameters for client api method calls.
I don't see anything wrong with that as the api/params package is
defined to have no other dependencies, and is just a holding package for
structures. It seems stupid to redefine it just because.
This interface should be both renamed, and have the first two methods
removed, as they are no longer needed.
I'm not yet pushing up changes because I don't want to write more code
that is going to get argued over until we have a consensus on api/params
return types and the interface name.
https:/ /codereview. appspot. com/29990045/ diff/1/ log/syslog/ config. go config. go (right):
File log/syslog/
https:/ /codereview. appspot. com/29990045/ diff/1/ log/syslog/ config. go#newcode135 config. go:135: slConfig. Port)
log/syslog/
On 2013/11/21 05:17:42, axw wrote:
> fmt.Sprint(
Done.
https:/ /codereview. appspot. com/29990045/ diff/1/ state/address. go
File state/address.go (right):
https:/ /codereview. appspot. com/29990045/ diff/1/ state/address. go#newcode116 go:116: ionInfo
state/address.
On 2013/11/22 00:46:52, wallyworld wrote:
> I think it's worth making this function return a struct.
> Since we are now returning a hodge podge of values, perhaps a better
method name
> is required
> eg DeployerAddressInfo or DeployerConnect
> I also think it may be worth naming this method to be the same as the
one on
> state, which is currently ServerAddresses().
Done.
https:/ /codereview. appspot. com/29990045/ diff/1/ state/address. go#newcode125 go:125: SyslogPort( ), nil
state/address.
On 2013/11/21 05:17:42, axw wrote:
> Difficult to parse, IMHO. I'd prefer
> stateAddresses = appendPort(addrs, config.StatePort())
> apiAddresses = appendPort(addrs, config.APIPort())
> return stateAddresses, apiAddresses, config.
Now this returns a struct, it is more obvious.
https:/ /codereview. appspot. com/29990045/ diff/1/ state/api/ params/ params. go params/ params. go (right):
File state/api/
https:/ /codereview. appspot. com/29990045/ diff/1/ state/api/ params/ params. go#newcode526 params/ params. go:526:
state/api/
On 2013/11/21 05:17:42, axw wrote:
> I know I'm being pedantic, but a port isn't exactly an address.
Multiple API
> calls isn't great, though. It would be nice if we could make bulk
calls of an
> arbitrary sequence of API methods.
Changed struct name.
https:/ /codereview. appspot. com/29990045/ diff/1/ worker/ deployer/ addresser. go deployer/ addresser. go (right):
File worker/
https:/ /codereview. appspot. com/29990045/ diff/1/ worker/ deployer/ addresser. go#newcode15 deployer/ addresser. go:15:
worker/
On 2013/11/22 00:46:52, wallyworld wrote:
> On 2013/11/21 05:17:42, axw wrote:
> > This seems like the wrong place to be talking about the API. This
should just
> be
> > about domain objects, I think.
> +1 ServerAddresses Results does not belong here. No api params
> params.
structs should
> escape the api infrastructure
OK, I disagree here on two fronts.
Firstly this interface should be renamed to have something to do with
the API. It defines the API methods that it calls.
Secondly there is already precedence for exporting api/params structures
as return parameters for client api method calls.
I don't see anything wrong with that as the api/params package is
defined to have no other dependencies, and is just a holding package for
structures. It seems stupid to redefine it just because.
This interface should be both renamed, and have the first two methods
removed, as they are no longer needed.
https:/ /codereview. appspot. com/29990045/