]> git.giacomolli.uk - onechat/blobdiff - model.go
Separate returns from longer statement blocks
[onechat] / model.go
index 61dbc5829a4bbfd4fc360ec9d67a68704697e8ed..7c856431124af275fa96c90582b0cdb1bb74be85 100644 (file)
--- a/model.go
+++ b/model.go
@@ -168,6 +168,16 @@ func (c *ModelClient) LimitReached() bool {
        return c.limit > 0 && c.calls.Load() >= c.limit
 }
 
        return c.limit > 0 && c.calls.Load() >= c.limit
 }
 
+// CallLimit returns the configured call limit, or zero for no limit.
+func (c *ModelClient) CallLimit() int64 {
+       return c.limit
+}
+
+// UsagePath returns the file that records the calls of this client.
+func (c *ModelClient) UsagePath() string {
+       return c.usage.path
+}
+
 // Create sends the call and reads its event stream to the end. Over the call
 // limit it sends nothing and returns errModelCallLimit.
 func (c *ModelClient) Create(ctx context.Context, request ModelRequest) (ModelResponse, error) {
 // Create sends the call and reads its event stream to the end. Over the call
 // limit it sends nothing and returns errModelCallLimit.
 func (c *ModelClient) Create(ctx context.Context, request ModelRequest) (ModelResponse, error) {