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

28-support-w3c-baggage-specification #206

Merged
merged 37 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ce23ca9
Support W3C Baggage specification
Dec 28, 2024
c8261d6
Merge pull request #184 from moxygen2001/main
hexiaofeng Dec 30, 2024
0708473
update propagation
hexiaofeng Dec 30, 2024
2c1db45
Refactor
hexiaofeng Dec 30, 2024
e75d831
Refactor
hexiaofeng Dec 30, 2024
a63180f
Refactor
hexiaofeng Dec 30, 2024
45ecb6c
Refactor
hexiaofeng Dec 30, 2024
416315d
Fix getValue when multi value.
hexiaofeng Jan 1, 2025
715dd58
do propagation implementation
Jan 5, 2025
87ff523
Merge pull request #198 from moxygen2001/28-support-w3c-baggage-speci…
hexiaofeng Jan 6, 2025
1fe3b5a
Update transmission
hexiaofeng Jan 6, 2025
c4165b0
Fix grpc header set
hexiaofeng Jan 6, 2025
e4fc890
Update transmission
hexiaofeng Jan 6, 2025
569c389
Update collection util
hexiaofeng Jan 6, 2025
defe844
Fix kafka header
hexiaofeng Jan 6, 2025
3294d8f
Writable headers
hexiaofeng Jan 7, 2025
795feb8
Fix propagation inject issue
hexiaofeng Jan 7, 2025
cb27a51
Writeable http headers
hexiaofeng Jan 7, 2025
2a9a549
Fix transmission
hexiaofeng Jan 7, 2025
496ba74
Fix transmission
hexiaofeng Jan 7, 2025
49096b6
Writeable http headers
hexiaofeng Jan 7, 2025
e55dc19
Fix transmission issue
hexiaofeng Jan 7, 2025
eb58579
Fix transmission issue
hexiaofeng Jan 7, 2025
d9bf8fb
Update transmission
hexiaofeng Jan 8, 2025
d4c3de2
Update transmission
hexiaofeng Jan 8, 2025
a68ed2b
Update transmission
hexiaofeng Jan 10, 2025
1645713
Update transmission
hexiaofeng Jan 10, 2025
7fe5ba9
Update transmission
hexiaofeng Jan 10, 2025
7d0b288
Add unit test
hexiaofeng Jan 10, 2025
09d02a4
Add unit test
hexiaofeng Jan 10, 2025
e3398e7
Update transmission
hexiaofeng Jan 11, 2025
6897b4e
Optimize grpc
hexiaofeng Jan 11, 2025
bfee43a
Optimize grpc & okhttp
hexiaofeng Jan 11, 2025
af1e9ca
Add write method
hexiaofeng Jan 12, 2025
cc7aba3
Add w3c todo
hexiaofeng Jan 12, 2025
1ab889c
Merge remote-tracking branch 'refs/remotes/origin/main' into 28-suppo…
chenzhiguo Jan 13, 2025
5ebdb59
Fix compile error
chenzhiguo Jan 13, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
*/
boolean nullable() default false;

/**
* Indicates whether the field is a component. The default is false,
*
* @return {@code true} if the field is a component; {@code false} otherwise.
*/
boolean component() default false;

/**
* Specifies the type of resource or class implementation to be loaded for the annotated field.
* The default is set to {@code ResourcerType.CORE_IMPL}, indicating a core implementation resource
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jd.live.agent.demo.springcloud.v2021.consumer.config;
package com.jd.live.agent.core.util;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "okhttp")
/**
* Represents a key-value pair.
*
* @param <K> the type of the key
* @param <V> the type of the value
*/
@Getter
@Setter
public class OkHttpConfig {
@AllArgsConstructor
public class KeyValue<K, V> {

private int readTimeout = 600;
/**
* The key in the key-value pair.
*/
private K key;

private int connectTimeout = 600;
/**
* The value in the key-value pair.
*/
private V value;

private int writeTimeout = 1200;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* Copyright © ${year} ${owner} (${email})
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jd.live.agent.core.util;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
* Represents a lookup index that can store a single index or a list of indices.
*/
@Getter
public class LookupIndex {

/**
* The single index value, initialized to -1 to indicate no index is set.
*/
private int index = -1;

/**
* The list of indices, initialized to null.
*/
private List<Integer> indices;

/**
* Adds an index to the lookup index.
* If no index is currently set, it initializes the single index with the provided value.
* If a single index is already set, it initializes the list of indices and adds both the current and new indices.
* Otherwise, it simply adds the new index to the list.
*
* @param index the index to add
*/
public void add(int index) {
if (this.index < 0) {
this.index = index;
} else if (indices == null) {
indices = new ArrayList<>(2);
indices.add(this.index);
indices.add(index);
} else {
indices.add(index);
}
}

/**
* Returns the number of indices stored in the lookup index.
* If there are multiple indices, it returns the size of the list.
* If there is a single index, it returns 1.
* If no indices are set, it returns 0.
*
* @return the number of indices stored
*/
public int size() {
if (indices != null) {
return indices.size();
} else if (index >= 0) {
return 1;
}
return 0;
}

}
Loading
Loading