@@ -474,11 +474,13 @@ func MustNewRemoteCapabilityInfo(
474474}
475475
476476const (
477- DefaultRegistrationRefresh = 30 * time .Second
478- DefaultRegistrationExpiry = 2 * time .Minute
479- DefaultMessageExpiry = 2 * time .Minute
480- DefaultBatchSize = 100
481- DefaultBatchCollectionPeriod = 100 * time .Millisecond
477+ DefaultRegistrationRefresh = 30 * time .Second
478+ DefaultRegistrationExpiry = 2 * time .Minute
479+ DefaultMessageExpiry = 2 * time .Minute
480+ DefaultBatchSize = 100
481+ DefaultBatchCollectionPeriod = 100 * time .Millisecond
482+ DefaultExecutableRequestTimeout = 8 * time .Minute
483+ DefaultServerMaxParallelRequests = 1000
482484)
483485
484486type RemoteTriggerConfig struct {
@@ -490,14 +492,19 @@ type RemoteTriggerConfig struct {
490492 BatchCollectionPeriod time.Duration
491493}
492494
493- type RemoteTargetConfig struct {
495+ type RemoteTargetConfig struct { // deprecated - v1 only
494496 RequestHashExcludedAttributes []string
495497}
496498
497499type RemoteExecutableConfig struct {
498- RequestHashExcludedAttributes []string
499- RegistrationRefresh time.Duration
500- RegistrationExpiry time.Duration
500+ RequestHashExcludedAttributes []string // deprecated - v1 only
501+
502+ // Fields below are used only by v2 capabilities
503+ TransmissionSchedule TransmissionSchedule
504+ DeltaStage time.Duration
505+ RequestTimeout time.Duration
506+ ServerMaxParallelRequests uint32
507+ RequestHasherType RequestHasherType
501508}
502509
503510// NOTE: consider splitting this config into values stored in Registry (KS-118)
@@ -527,12 +534,39 @@ func (c *RemoteExecutableConfig) ApplyDefaults() {
527534 if c == nil {
528535 return
529536 }
530- if c .RegistrationRefresh == 0 {
531- c .RegistrationRefresh = DefaultRegistrationRefresh
537+ // Default schedule is 0 ("all at once"), default delta stage is 0.
538+ if c .RequestTimeout == 0 {
539+ c .RequestTimeout = DefaultExecutableRequestTimeout
532540 }
533- if c .RegistrationExpiry == 0 {
534- c .RegistrationExpiry = DefaultRegistrationExpiry
541+ if c .ServerMaxParallelRequests == 0 {
542+ c .ServerMaxParallelRequests = DefaultServerMaxParallelRequests
535543 }
544+ // Hasher type 0 is the default type.
545+ }
546+
547+ type AggregatorType int
548+ type TransmissionSchedule int
549+ type RequestHasherType int
550+
551+ const (
552+ AggregatorType_Mode AggregatorType = 0
553+ AggregatorType_SignedReport AggregatorType = 1
554+
555+ Schedule_AllAtOnce TransmissionSchedule = 0
556+ Schedule_OneAtATime TransmissionSchedule = 1
557+
558+ RequestHasherType_Simple RequestHasherType = 0
559+ RequestHasherType_WriteReportExcludeSignatures RequestHasherType = 1
560+ )
561+
562+ type AggregatorConfig struct {
563+ AggregatorType AggregatorType
564+ }
565+
566+ type CapabilityMethodConfig struct {
567+ RemoteTriggerConfig * RemoteTriggerConfig
568+ RemoteExecutableConfig * RemoteExecutableConfig
569+ AggregatorConfig * AggregatorConfig
536570}
537571
538572type CapabilityConfiguration struct {
@@ -546,4 +580,7 @@ type CapabilityConfiguration struct {
546580 RemoteTriggerConfig * RemoteTriggerConfig
547581 RemoteTargetConfig * RemoteTargetConfig
548582 RemoteExecutableConfig * RemoteExecutableConfig
583+
584+ // v2 / "NoDAG" capabilities
585+ CapabilityMethodConfig map [string ]CapabilityMethodConfig
549586}
0 commit comments