Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync proto #637

Merged
merged 2 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions api/compute/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,12 @@ type OutputConf struct {
}

type ProducerConfig struct {
MaxPendingMessages int32 `json:"maxPendingMessages,omitempty"`
MaxPendingMessagesAcrossPartitions int32 `json:"maxPendingMessagesAcrossPartitions,omitempty"`
UseThreadLocalProducers bool `json:"useThreadLocalProducers,omitempty"`
CryptoConfig *CryptoConfig `json:"cryptoConfig,omitempty"`
BatchBuilder string `json:"batchBuilder,omitempty"`
MaxPendingMessages int32 `json:"maxPendingMessages,omitempty"`
MaxPendingMessagesAcrossPartitions int32 `json:"maxPendingMessagesAcrossPartitions,omitempty"`
UseThreadLocalProducers bool `json:"useThreadLocalProducers,omitempty"`
CryptoConfig *CryptoConfig `json:"cryptoConfig,omitempty"`
BatchBuilder string `json:"batchBuilder,omitempty"`
CompressionType CompressionType `json:"compressionType,omitempty"`
}

type CryptoConfig struct {
Expand Down Expand Up @@ -334,6 +335,18 @@ const (
Earliest SubscribePosition = "earliest"
)

// CompressionType enum type
// +kubebuilder:validation:Enum=NONE;LZ4;ZLIB;ZSTD;SNAPPY
type CompressionType string

const (
LZ4 CompressionType = "LZ4"
NONE CompressionType = "NONE"
ZLIB CompressionType = "ZLIB"
ZSTD CompressionType = "ZSTD"
SNAPPY CompressionType = "SNAPPY"
)

type Component string

const (
Expand Down Expand Up @@ -377,13 +390,14 @@ const (
)

// ProcessGuarantee enum type
// +kubebuilder:validation:Enum=atleast_once;atmost_once;effectively_once
// +kubebuilder:validation:Enum=atleast_once;atmost_once;effectively_once;manual
type ProcessGuarantee string

const (
AtleastOnce ProcessGuarantee = "atleast_once"
AtmostOnce ProcessGuarantee = "atmost_once"
EffectivelyOnce ProcessGuarantee = "effectively_once"
Manual ProcessGuarantee = "manual"
)

const (
Expand Down
1 change: 1 addition & 0 deletions api/compute/v1alpha1/function_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ type FunctionSpec struct {
SubscriptionName string `json:"subscriptionName,omitempty"`
CleanupSubscription bool `json:"cleanupSubscription,omitempty"`
SubscriptionPosition SubscribePosition `json:"subscriptionPosition,omitempty"`
SkipToLatest bool `json:"skipToLatest,omitempty"`

Pod PodPolicy `json:"pod,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -3135,6 +3143,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down Expand Up @@ -3303,6 +3312,8 @@ spec:
type: object
showPreciseParallelism:
type: boolean
skipToLatest:
type: boolean
statefulConfig:
properties:
pulsar:
Expand Down Expand Up @@ -6580,6 +6591,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down Expand Up @@ -6947,6 +6959,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -9829,6 +9849,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -3154,6 +3162,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down Expand Up @@ -3322,6 +3331,8 @@ spec:
type: object
showPreciseParallelism:
type: boolean
skipToLatest:
type: boolean
statefulConfig:
properties:
pulsar:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3081,6 +3081,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -3068,6 +3076,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down
21 changes: 21 additions & 0 deletions config/crd/bases/compute.functionmesh.io_functionmeshes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -3136,6 +3144,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down Expand Up @@ -3304,6 +3313,8 @@ spec:
type: object
showPreciseParallelism:
type: boolean
skipToLatest:
type: boolean
statefulConfig:
properties:
pulsar:
Expand Down Expand Up @@ -6581,6 +6592,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down Expand Up @@ -6948,6 +6960,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -9830,6 +9850,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down
11 changes: 11 additions & 0 deletions config/crd/bases/compute.functionmesh.io_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -3133,6 +3141,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down Expand Up @@ -3301,6 +3310,8 @@ spec:
type: object
showPreciseParallelism:
type: boolean
skipToLatest:
type: boolean
statefulConfig:
properties:
pulsar:
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/compute.functionmesh.io_sinks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3060,6 +3060,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down
9 changes: 9 additions & 0 deletions config/crd/bases/compute.functionmesh.io_sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ spec:
properties:
batchBuilder:
type: string
compressionType:
enum:
- NONE
- LZ4
- ZLIB
- ZSTD
- SNAPPY
type: string
cryptoConfig:
properties:
consumerCryptoFailureAction:
Expand Down Expand Up @@ -3047,6 +3055,7 @@ spec:
- atleast_once
- atmost_once
- effectively_once
- manual
type: string
pulsar:
properties:
Expand Down
Loading