Skip to content

Commit 612bac5

Browse files
DOC-12763: Eventing Rearchitecture (#188)
* Update spec * Add examples * Interbucket recursion is global only * Build output documentation --------- Co-authored-by: tech-comm-team-couchbase <tech-comm-team@couchbase.com>
1 parent f01eb76 commit 612bac5

5 files changed

Lines changed: 577 additions & 315 deletions

File tree

docs/modules/eventing-rest-api/attachments/eventing.yaml

Lines changed: 80 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -610,19 +610,45 @@ paths:
610610
$ref: '#/components/responses/Goof'
611611

612612
/api/v1/config:
613+
parameters:
614+
- name: bucket
615+
schema:
616+
type: string
617+
in: query
618+
required: false
619+
description: |-
620+
For scoped configuration settings only.
621+
The bucket to which the configuration settings apply.
622+
- name: scope
623+
schema:
624+
type: string
625+
in: query
626+
required: false
627+
description: |-
628+
For scoped configuration settings only.
629+
The scope to which the configuration settings apply.
613630
get:
614631
operationId: config_get
615-
summary: List Global Config
632+
summary: List Service Config
616633
description: |-
617-
Shows all global configuration settings.
618-
Note that the `enable_debugger` and `ram_quota` settings can also be adjusted via the UI.
634+
Shows all service configuration settings.
635+
636+
In Couchbase Server 8.0 and later, you can list service configuration settings globally, or at the function scope level.
637+
When you list settings at the function scope level, the settings apply only to functions within that function scope.
638+
Some service configuration settings are only available globally.
639+
640+
Service configuration settings at the function scope level take precedence over global service configuration settings.
641+
If a setting is not specified at the function scope level, the Eventing service checks at the bucket level, and then falls back to the global level.
642+
643+
You can also see the current values of the `enable_debugger` and `ram_quota` settings via the UI.
619644
tags:
620-
- global config
645+
- service config
621646
security:
622-
- Unscoped: []
647+
- Global: []
648+
- Scoped: []
623649
responses:
624650
"200":
625-
description: Returns an object showing the global configuration settings.
651+
description: Returns an object showing the service configuration settings.
626652
content:
627653
application/json:
628654
schema:
@@ -631,23 +657,33 @@ paths:
631657
$ref: '#/components/responses/Goof'
632658
post:
633659
operationId: config_update
634-
summary: Modify Global Config
660+
summary: Modify Service Config
635661
description: |-
636-
Modify global configuration settings.
662+
Modify service configuration settings.
637663
During an edit, settings provided are merged.
638664
Unspecified attributes retain their prior values.
639665
The response indicates whether the Eventing service must be restarted for the new changes to take effect.
666+
667+
In Couchbase Server 8.0 and later, you can modify service configuration settings globally, or at the function scope level.
668+
When you modify settings at the function scope level, the settings apply only to functions within that function scope.
669+
Some service configuration settings are only available globally.
670+
671+
Service configuration settings at the function scope level take precedence over global service configuration settings.
672+
If a setting is not specified at the function scope level, the Eventing service checks at the bucket level, and then falls back to the global level.
673+
674+
You can also modify the `enable_debugger` and `ram_quota` settings via the UI.
640675
tags:
641-
- global config
676+
- service config
642677
requestBody:
643678
required: true
644-
description: An object providing the global configuration settings.
679+
description: An object providing the service configuration settings.
645680
content:
646681
application/json:
647682
schema:
648683
$ref: "#/components/schemas/UnivConfig"
649684
security:
650-
- Unscoped: []
685+
- Global: []
686+
- Scoped: []
651687
responses:
652688
"200":
653689
$ref: '#/components/responses/OK'
@@ -875,7 +911,7 @@ components:
875911
$ref: "#/components/schemas/handler_schema"
876912

877913
UnivConfig:
878-
title: Global Config
914+
title: Service Config
879915
type: object
880916
properties:
881917
ram_quota:
@@ -884,27 +920,54 @@ components:
884920
example: 512
885921
x-has-example: true
886922
x-has-default: true
887-
description: The memory allocation for the Eventing Service, per node.
923+
description: |-
924+
The memory allocation for the Eventing Service, per node.
925+
926+
This setting is only available globally.
927+
enable_curl:
928+
type: boolean
929+
description: |-
930+
Enables the Eventing curl function.
931+
For details, see [cURL](/server/8.0/eventing/eventing-curl-spec.html).
932+
933+
This setting is available globally or at the function scope level.
888934
enable_debugger:
889935
type: boolean
890936
default: false
891937
x-has-default: true
892938
description: |-
893939
Enables the Eventing service debugger.
894940
For details, see [Debugging and Diagnosability](/server/8.0/eventing/eventing-debugging-and-diagnosability.html).
941+
942+
This setting is available globally or at the function scope level.
895943
cursor_limit:
896944
type: integer
897945
default: 5
898946
maximum: 20
899947
minimum: 1
900948
x-has-default: true
901949
description: |-
902-
The maximum number of cursor-aware Eventing functions that can coexist on a given source keyspace. (A cursor-aware Eventing function is one for which the `cursor_aware` setting is `true`.)
950+
The maximum number of cursor-aware Eventing functions that can coexist on a given source keyspace.
951+
(A cursor-aware Eventing function is one for which the `cursor_aware` setting is `true`.)
903952
904953
Increasing this setting enables more cursor-aware Eventing functions to register and listen to any given collection.
905954
906955
Decreasing this setting prevents further cursor-aware Eventing functions from being registered on any given collection; however, it doesn't unregister already registered cursor-aware Eventing functions.
907956
957+
This setting is only available globally.
958+
num_nodes_running:
959+
type: integer
960+
example: 3
961+
x-has-example: true
962+
x-desc-status: Couchbase Server 8.0
963+
description: |-
964+
The number of Eventing nodes on which the functions in scope execute.
965+
966+
By default, all Eventing functions run on all Eventing nodes.
967+
If this setting is specified, the Evening Service attempts to run the functions in scope on the specified number of nodes.
968+
If fewer nodes are available, the functions run on all available nodes.
969+
970+
This setting is available globally or at the function scope level.
908971
responses:
909972
OK:
910973
description: Success.
@@ -917,8 +980,8 @@ components:
917980
type: http
918981
scheme: basic
919982
description: |-
920-
Global functions with a function scope of ``*.*`` can only be made or managed by users with the Full Admin or Eventing Full Admin role.
921-
For global functions, you do not need to pass the `bucket` and `scope` query parameters to specify the function scope.
983+
Global functions and service configuration settings with a function scope of ``*.*`` can only be made or managed by users with the Full Admin or Eventing Full Admin role.
984+
For global functions and service configuration settings, you do not need to pass the `bucket` and `scope` query parameters to specify the function scope.
922985
The credentials must be an administrator username and password.
923986
924987
Note that this is the default function scope for all functions after an upgrade from a prior version.
@@ -927,7 +990,7 @@ components:
927990
type: http
928991
scheme: basic
929992
description: |-
930-
For scoped functions, you must pass the `bucket` and `scope` query parameters to specify the function scope.
993+
For scoped functions and service configuration settings, you must pass the `bucket` and `scope` query parameters to specify the function scope.
931994
The credentials are the username and password of any authorized user.
932995
933996
You can quote the REST call on the command line to escape the `&` and `?` characters.

0 commit comments

Comments
 (0)