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

feat: warm up the normalization cache using variable variations #1522

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
325 changes: 217 additions & 108 deletions connect-go/gen/proto/wg/cosmo/node/v1/node.pb.go

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions connect/src/wg/cosmo/node/v1/node_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,20 @@ export class OperationRequest extends Message<OperationRequest> {
*/
extensions?: Extension;

/**
* we're only interested in variables that are relevant for normalization
* as such, we only need booleans that are used for skip/include
* consequently, variables is a map of key->bool
*
* @generated from field: map<string, bool> variables = 4;
*/
variables: { [key: string]: boolean } = {};

/**
* @generated from field: repeated wg.cosmo.node.v1.VariableVariation variable_variations = 5;
*/
variableVariations: VariableVariation[] = [];

constructor(data?: PartialMessage<OperationRequest>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -2388,6 +2402,8 @@ export class OperationRequest extends Message<OperationRequest> {
{ no: 1, name: "operation_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "extensions", kind: "message", T: Extension },
{ no: 4, name: "variables", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} },
{ no: 5, name: "variable_variations", kind: "message", T: VariableVariation, repeated: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OperationRequest {
Expand All @@ -2407,6 +2423,43 @@ export class OperationRequest extends Message<OperationRequest> {
}
}

/**
* @generated from message wg.cosmo.node.v1.VariableVariation
*/
export class VariableVariation extends Message<VariableVariation> {
/**
* @generated from field: map<string, bool> variables = 1;
*/
variables: { [key: string]: boolean } = {};

constructor(data?: PartialMessage<VariableVariation>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "wg.cosmo.node.v1.VariableVariation";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "variables", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VariableVariation {
return new VariableVariation().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VariableVariation {
return new VariableVariation().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VariableVariation {
return new VariableVariation().fromJsonString(jsonString, options);
}

static equals(a: VariableVariation | PlainMessage<VariableVariation> | undefined, b: VariableVariation | PlainMessage<VariableVariation> | undefined): boolean {
return proto3.util.equals(VariableVariation, a, b);
}
}

/**
* @generated from message wg.cosmo.node.v1.Extension
*/
Expand Down
Loading
Loading