-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add dmsghttp logserver route #1579
Changes from all commits
0219ce8
30d4055
2136e61
28cf999
7f5f6a7
13d67d6
cc0f8b0
598a398
f4a5b85
664b652
1c6cd55
68adf7b
22a5d5c
8eb076e
9728b5b
bb13cd4
26ee1f8
7662a3d
e19f5de
4361174
9a3e04e
289b167
93a7f7e
f9df75d
e94d07b
3287ca4
15fc1c6
7a7cdab
5174f48
49ce0d9
041a06a
a5e5dc4
9656094
0612c0d
8a18313
7322064
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,84 +54,3 @@ func (d *Duration) UnmarshalJSON(b []byte) error { | |
return errors.New("invalid duration") | ||
} | ||
} | ||
|
||
// VisorConfig is every field of the config | ||
type VisorConfig struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the old visorconfig, right? Any reason we are deleting it? Because its not used anymore and we dont expect users to have to upgrade from that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that was something that I added there a long time ago that i think was used briefly but then not used |
||
Version string `json:"version"` | ||
Sk string `json:"sk"` | ||
Pk string `json:"pk"` | ||
Dmsg struct { | ||
Discovery string `json:"discovery"` | ||
SessionsCount int `json:"sessions_count"` | ||
Servers []struct { | ||
Version string `json:"version"` | ||
Sequence int `json:"sequence"` | ||
Timestamp int `json:"timestamp"` | ||
Static string `json:"static"` | ||
Server struct { | ||
Address string `json:"address"` | ||
AvailableSessions int `json:"availableSessions"` | ||
} `json:"server"` | ||
} `json:"servers"` | ||
} `json:"dmsg"` | ||
Dmsgpty struct { | ||
DmsgPort int `json:"dmsg_port"` | ||
CliNetwork string `json:"cli_network"` | ||
CliAddress string `json:"cli_address"` | ||
} `json:"dmsgpty"` | ||
SkywireTCP struct { | ||
PkTable interface{} `json:"pk_table"` | ||
ListeningAddress string `json:"listening_address"` | ||
} `json:"skywire-tcp"` | ||
Transport struct { | ||
Discovery string `json:"discovery"` | ||
AddressResolver string `json:"address_resolver"` | ||
PublicAutoconnect bool `json:"public_autoconnect"` | ||
TransportSetupNodes interface{} `json:"transport_setup_nodes"` | ||
} `json:"transport"` | ||
Routing struct { | ||
SetupNodes []string `json:"setup_nodes"` | ||
RouteFinder string `json:"route_finder"` | ||
RouteFinderTimeout string `json:"route_finder_timeout"` | ||
MinHops int `json:"min_hops"` | ||
} `json:"routing"` | ||
UptimeTracker struct { | ||
Addr string `json:"addr"` | ||
} `json:"uptime_tracker"` | ||
Launcher struct { | ||
ServiceDiscovery string `json:"service_discovery"` | ||
Apps []struct { | ||
Name string `json:"name"` | ||
AutoStart bool `json:"auto_start"` | ||
Port int `json:"port"` | ||
Args []string `json:"args,omitempty"` | ||
} `json:"apps"` | ||
ServerAddr string `json:"server_addr"` | ||
BinPath string `json:"bin_path"` | ||
} `json:"launcher"` | ||
Hypervisors []interface{} `json:"hypervisors"` | ||
CliAddr string `json:"cli_addr"` | ||
LogLevel string `json:"log_level"` | ||
LocalPath string `json:"local_path"` | ||
StunServers []string `json:"stun_servers"` | ||
ShutdownTimeout string `json:"shutdown_timeout"` | ||
RestartCheckDelay string `json:"restart_check_delay"` | ||
IsPublic bool `json:"is_public"` | ||
PersistentTransports interface{} `json:"persistent_transports"` | ||
Hypervisor struct { | ||
DbPath string `json:"db_path"` | ||
EnableAuth bool `json:"enable_auth"` | ||
Cookies struct { | ||
HashKey string `json:"hash_key"` | ||
BlockKey string `json:"block_key"` | ||
ExpiresDuration int64 `json:"expires_duration"` | ||
Path string `json:"path"` | ||
Domain string `json:"domain"` | ||
} `json:"cookies"` | ||
DmsgPort int `json:"dmsg_port"` | ||
HTTPAddr string `json:"http_addr"` | ||
EnableTLS bool `json:"enable_tls"` | ||
TLSCertFile string `json:"tls_cert_file"` | ||
TLSKeyFile string `json:"tls_key_file"` | ||
} `json:"hypervisor"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I mentioned this before, but you can literally just do:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am intentionally using generic c.Writer.Write methods instead of gin's type-specific methods.
It makes it more interchangeable with standard library http server in case we ever decide to move away from gin.