@@ -469,11 +469,13 @@ func MustNewRemoteCapabilityInfo(
469469}
470470
471471const (
472- DefaultRegistrationRefresh = 30 * time .Second
473- DefaultRegistrationExpiry = 2 * time .Minute
474- DefaultMessageExpiry = 2 * time .Minute
475- DefaultBatchSize = 100
476- DefaultBatchCollectionPeriod = 100 * time .Millisecond
472+ DefaultRegistrationRefresh = 30 * time .Second
473+ DefaultRegistrationExpiry = 2 * time .Minute
474+ DefaultMessageExpiry = 2 * time .Minute
475+ DefaultBatchSize = 100
476+ DefaultBatchCollectionPeriod = 100 * time .Millisecond
477+ DefaultExecutableRequestTimeout = 8 * time .Minute
478+ DefaultServerMaxParallelRequests = 1000
477479)
478480
479481type RemoteTriggerConfig struct {
@@ -485,14 +487,19 @@ type RemoteTriggerConfig struct {
485487 BatchCollectionPeriod time.Duration
486488}
487489
488- type RemoteTargetConfig struct {
490+ type RemoteTargetConfig struct { // deprecated - v1 only
489491 RequestHashExcludedAttributes []string
490492}
491493
492494type RemoteExecutableConfig struct {
493- RequestHashExcludedAttributes []string
494- RegistrationRefresh time.Duration
495- RegistrationExpiry time.Duration
495+ RequestHashExcludedAttributes []string // deprecated - v1 only
496+
497+ // Fields below are used only by v2 capabilities
498+ TransmissionSchedule uint32
499+ DeltaStage time.Duration
500+ RequestTimeout time.Duration
501+ ServerMaxParallelRequests uint32
502+ RequestHasherType uint32
496503}
497504
498505// NOTE: consider splitting this config into values stored in Registry (KS-118)
@@ -522,12 +529,39 @@ func (c *RemoteExecutableConfig) ApplyDefaults() {
522529 if c == nil {
523530 return
524531 }
525- if c .RegistrationRefresh == 0 {
526- c .RegistrationRefresh = DefaultRegistrationRefresh
532+ // Default schedule is 0 ("all at once"), default delta stage is 0.
533+ if c .RequestTimeout == 0 {
534+ c .RequestTimeout = DefaultExecutableRequestTimeout
527535 }
528- if c .RegistrationExpiry == 0 {
529- c .RegistrationExpiry = DefaultRegistrationExpiry
536+ if c .ServerMaxParallelRequests == 0 {
537+ c .ServerMaxParallelRequests = DefaultServerMaxParallelRequests
530538 }
539+ // Hasher type 0 is the default type.
540+ }
541+
542+ type AggregatorType int
543+ type TransmissionSchedule int
544+ type RequestHasherType int
545+
546+ const (
547+ AggregatorType_Mode AggregatorType = 0
548+ AggregatorType_SignedReport AggregatorType = 1
549+
550+ Schedule_AllAtOnce TransmissionSchedule = 0
551+ Schedule_OneAtATime TransmissionSchedule = 1
552+
553+ RequestHasherType_Mode RequestHasherType = 0
554+ RequestHasherType_SignedReport RequestHasherType = 1
555+ )
556+
557+ type AggregatorConfig struct {
558+ AggregatorType AggregatorType
559+ }
560+
561+ type CapabilityMethodConfig struct {
562+ RemoteTriggerConfig * RemoteTriggerConfig
563+ RemoteExecutableConfig * RemoteExecutableConfig
564+ AggregatorConfig * AggregatorConfig
531565}
532566
533567type CapabilityConfiguration struct {
@@ -541,4 +575,7 @@ type CapabilityConfiguration struct {
541575 RemoteTriggerConfig * RemoteTriggerConfig
542576 RemoteTargetConfig * RemoteTargetConfig
543577 RemoteExecutableConfig * RemoteExecutableConfig
578+
579+ // v2 / "NoDAG" capabilities
580+ CapabilityMethodConfig map [string ]CapabilityMethodConfig
544581}
0 commit comments