mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-12 14:10:31 +08:00
TUN-2309: Split ConnectResult into ConnectError and ConnectSuccess, each implementing its own capnp serialization logic
This commit is contained in:
@@ -62,11 +62,10 @@ struct CapnpConnectParameters {
|
||||
}
|
||||
|
||||
struct ConnectResult {
|
||||
err @0 :ConnectError;
|
||||
# Information about the server this connection is established with
|
||||
serverInfo @1 :ServerInfo;
|
||||
# How this cloudflared instance should be configured
|
||||
clientConfig @2 :ClientConfig;
|
||||
result :union {
|
||||
err @0 :ConnectError;
|
||||
success @1 :ConnectSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
struct ConnectError {
|
||||
@@ -76,6 +75,13 @@ struct ConnectError {
|
||||
shouldRetry @2 :Bool;
|
||||
}
|
||||
|
||||
struct ConnectSuccess {
|
||||
# Information about the server this connection is established with
|
||||
serverLocationName @0 :Text;
|
||||
# How this cloudflared instance should be configured. This can be null if there isn't an intent for this origin yet
|
||||
clientConfig @1 :ClientConfig;
|
||||
}
|
||||
|
||||
struct ClientConfig {
|
||||
# Version of this configuration. This value is opaque, but is guaranteed
|
||||
# to monotonically increase in value. Any configuration supplied to
|
||||
|
||||
Reference in New Issue
Block a user