Skip to content

Commit

Permalink
Add setSubchannel
Browse files Browse the repository at this point in the history
  • Loading branch information
hexiaofeng committed Dec 24, 2024
1 parent bac20c5 commit 9f85947
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
import java.util.List;
import java.util.function.Function;

/**
* Represents advice for live picker, which includes a subchannel and an election function to determine the active subchannel.
*/
public class LivePickerAdvice {

public static final CallOptions.Key<LivePickerAdvice> KEY_PICKER_ADVICE = CallOptions.Key.create("x-picker-advice");

private final LiveSubchannel subchannel;
private LiveSubchannel subchannel;

private final Function<List<LiveSubchannel>, LiveSubchannel> election;

Expand All @@ -45,6 +48,10 @@ public LiveSubchannel getSubchannel() {
return subchannel;
}

public void setSubchannel(LiveSubchannel subchannel) {
this.subchannel = subchannel;
}

public Function<List<LiveSubchannel>, LiveSubchannel> getElection() {
return election;
}
Expand Down

0 comments on commit 9f85947

Please sign in to comment.