Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #26 from uber/options
Browse files Browse the repository at this point in the history
Add options field to cg and destination
  • Loading branch information
kobeyang authored Aug 15, 2017
2 parents 2cb0e2e + ae27e7c commit 98e566b
Show file tree
Hide file tree
Showing 9 changed files with 2,011 additions and 960 deletions.
810 changes: 605 additions & 205 deletions .generated/go/cherami/cherami.go

Large diffs are not rendered by default.

269 changes: 154 additions & 115 deletions .generated/go/cherami/tchan-cherami.go

Large diffs are not rendered by default.

211 changes: 135 additions & 76 deletions .generated/go/controller/tchan-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ func (c *tchanControllerClient) CreateConsumerGroup(ctx thrift.Context, createRe
}
success, err := c.client.Call(ctx, c.thriftService, "createConsumerGroup", &args, &resp)
if err == nil && !success {
if e := resp.EntityExistsError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityExistsError != nil:
err = resp.EntityExistsError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for createConsumerGroup")
}
}

Expand All @@ -109,14 +110,15 @@ func (c *tchanControllerClient) CreateDestination(ctx thrift.Context, createRequ
}
success, err := c.client.Call(ctx, c.thriftService, "createDestination", &args, &resp)
if err == nil && !success {
if e := resp.EntityExistsError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityExistsError != nil:
err = resp.EntityExistsError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for createDestination")
}
}

Expand All @@ -130,14 +132,15 @@ func (c *tchanControllerClient) CreateRemoteZoneConsumerGroupExtent(ctx thrift.C
}
success, err := c.client.Call(ctx, c.thriftService, "createRemoteZoneConsumerGroupExtent", &args, &resp)
if err == nil && !success {
if e := resp.EntityExistsError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityExistsError != nil:
err = resp.EntityExistsError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for createRemoteZoneConsumerGroupExtent")
}
}

Expand All @@ -151,14 +154,15 @@ func (c *tchanControllerClient) CreateRemoteZoneExtent(ctx thrift.Context, creat
}
success, err := c.client.Call(ctx, c.thriftService, "createRemoteZoneExtent", &args, &resp)
if err == nil && !success {
if e := resp.EntityExistsError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityExistsError != nil:
err = resp.EntityExistsError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for createRemoteZoneExtent")
}
}

Expand All @@ -172,14 +176,15 @@ func (c *tchanControllerClient) DeleteConsumerGroup(ctx thrift.Context, deleteRe
}
success, err := c.client.Call(ctx, c.thriftService, "deleteConsumerGroup", &args, &resp)
if err == nil && !success {
if e := resp.EntityError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityError != nil:
err = resp.EntityError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for deleteConsumerGroup")
}
}

Expand All @@ -193,14 +198,15 @@ func (c *tchanControllerClient) DeleteDestination(ctx thrift.Context, deleteRequ
}
success, err := c.client.Call(ctx, c.thriftService, "deleteDestination", &args, &resp)
if err == nil && !success {
if e := resp.EntityError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityError != nil:
err = resp.EntityError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for deleteDestination")
}
}

Expand All @@ -214,6 +220,10 @@ func (c *tchanControllerClient) GetCapacities(ctx thrift.Context, getCapacitiesR
}
success, err := c.client.Call(ctx, c.thriftService, "getCapacities", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for getCapacities")
}
}

return resp.GetSuccess(), err
Expand All @@ -226,11 +236,13 @@ func (c *tchanControllerClient) GetInputHosts(ctx thrift.Context, getHostsReques
}
success, err := c.client.Call(ctx, c.thriftService, "getInputHosts", &args, &resp)
if err == nil && !success {
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for getInputHosts")
}
}

Expand All @@ -244,11 +256,13 @@ func (c *tchanControllerClient) GetOutputHosts(ctx thrift.Context, getHostsReque
}
success, err := c.client.Call(ctx, c.thriftService, "getOutputHosts", &args, &resp)
if err == nil && !success {
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for getOutputHosts")
}
}

Expand All @@ -262,8 +276,11 @@ func (c *tchanControllerClient) GetQueueDepthInfo(ctx thrift.Context, getQueueDe
}
success, err := c.client.Call(ctx, c.thriftService, "getQueueDepthInfo", &args, &resp)
if err == nil && !success {
if e := resp.CacheMissError; e != nil {
err = e
switch {
case resp.CacheMissError != nil:
err = resp.CacheMissError
default:
err = fmt.Errorf("received no result or unknown exception for getQueueDepthInfo")
}
}

Expand All @@ -277,6 +294,10 @@ func (c *tchanControllerClient) RemoveCapacities(ctx thrift.Context, removeCapac
}
success, err := c.client.Call(ctx, c.thriftService, "removeCapacities", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for removeCapacities")
}
}

return err
Expand All @@ -289,6 +310,10 @@ func (c *tchanControllerClient) ReportConsumerGroupExtentMetric(ctx thrift.Conte
}
success, err := c.client.Call(ctx, c.thriftService, "reportConsumerGroupExtentMetric", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for reportConsumerGroupExtentMetric")
}
}

return err
Expand All @@ -301,6 +326,10 @@ func (c *tchanControllerClient) ReportConsumerGroupMetric(ctx thrift.Context, re
}
success, err := c.client.Call(ctx, c.thriftService, "reportConsumerGroupMetric", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for reportConsumerGroupMetric")
}
}

return err
Expand All @@ -313,6 +342,10 @@ func (c *tchanControllerClient) ReportDestinationExtentMetric(ctx thrift.Context
}
success, err := c.client.Call(ctx, c.thriftService, "reportDestinationExtentMetric", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for reportDestinationExtentMetric")
}
}

return err
Expand All @@ -325,6 +358,10 @@ func (c *tchanControllerClient) ReportDestinationMetric(ctx thrift.Context, repo
}
success, err := c.client.Call(ctx, c.thriftService, "reportDestinationMetric", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for reportDestinationMetric")
}
}

return err
Expand All @@ -337,6 +374,10 @@ func (c *tchanControllerClient) ReportNodeMetric(ctx thrift.Context, reportMetri
}
success, err := c.client.Call(ctx, c.thriftService, "reportNodeMetric", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for reportNodeMetric")
}
}

return err
Expand All @@ -349,6 +390,10 @@ func (c *tchanControllerClient) ReportStoreExtentMetric(ctx thrift.Context, repo
}
success, err := c.client.Call(ctx, c.thriftService, "reportStoreExtentMetric", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for reportStoreExtentMetric")
}
}

return err
Expand All @@ -361,14 +406,15 @@ func (c *tchanControllerClient) UpdateConsumerGroup(ctx thrift.Context, updateRe
}
success, err := c.client.Call(ctx, c.thriftService, "updateConsumerGroup", &args, &resp)
if err == nil && !success {
if e := resp.EntityError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityError != nil:
err = resp.EntityError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for updateConsumerGroup")
}
}

Expand All @@ -382,14 +428,15 @@ func (c *tchanControllerClient) UpdateDestination(ctx thrift.Context, updateRequ
}
success, err := c.client.Call(ctx, c.thriftService, "updateDestination", &args, &resp)
if err == nil && !success {
if e := resp.EntityError; e != nil {
err = e
}
if e := resp.RequestError; e != nil {
err = e
}
if e := resp.InternalError; e != nil {
err = e
switch {
case resp.EntityError != nil:
err = resp.EntityError
case resp.RequestError != nil:
err = resp.RequestError
case resp.InternalError != nil:
err = resp.InternalError
default:
err = fmt.Errorf("received no result or unknown exception for updateDestination")
}
}

Expand All @@ -403,6 +450,10 @@ func (c *tchanControllerClient) UpsertInputHostCapacities(ctx thrift.Context, up
}
success, err := c.client.Call(ctx, c.thriftService, "upsertInputHostCapacities", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for upsertInputHostCapacities")
}
}

return err
Expand All @@ -415,6 +466,10 @@ func (c *tchanControllerClient) UpsertOutputHostCapacities(ctx thrift.Context, u
}
success, err := c.client.Call(ctx, c.thriftService, "upsertOutputHostCapacities", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for upsertOutputHostCapacities")
}
}

return err
Expand All @@ -427,6 +482,10 @@ func (c *tchanControllerClient) UpsertStoreCapacities(ctx thrift.Context, upsert
}
success, err := c.client.Call(ctx, c.thriftService, "upsertStoreCapacities", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for upsertStoreCapacities")
}
}

return err
Expand Down
Loading

0 comments on commit 98e566b

Please sign in to comment.