From 8bb6bf6be34e2185a7199dc8465faee335cf61a8 Mon Sep 17 00:00:00 2001 From: fish <920886811@163.com> Date: Wed, 20 Jul 2022 15:24:07 +0800 Subject: [PATCH] feat: add OnlineServerDomain --- experiments.go | 2 ++ init.go | 3 +++ profile.go | 4 ++++ services.go | 1 + 4 files changed, 10 insertions(+) diff --git a/experiments.go b/experiments.go index 731844f..70a85a5 100644 --- a/experiments.go +++ b/experiments.go @@ -18,4 +18,6 @@ type Experiments struct { DisableAutoUpdate bool HostRepairEnabled bool HostChallengeEnabled bool + ReportOnline bool + ReportStatus bool } diff --git a/init.go b/init.go index db0c2d1..6b1cfbb 100644 --- a/init.go +++ b/init.go @@ -212,6 +212,7 @@ func flatfsSpec() map[string]interface{} { func DefaultServicesConfig() Services { return Services{ StatusServerDomain: "https://status.btfs.io", + OnlineServerDomain: "https://online.btfs.io", HubDomain: "https://hub.btfs.io", EscrowDomain: "https://escrow.btfs.io", GuardDomain: "https://guard.btfs.io", @@ -228,6 +229,7 @@ func DefaultServicesConfig() Services { func DefaultServicesConfigDev() Services { return Services{ StatusServerDomain: "https://status-dev.btfs.io", + OnlineServerDomain: "https://online-dev.btfs.io", HubDomain: "https://hub-dev.btfs.io", EscrowDomain: "https://escrow-dev.btfs.io", GuardDomain: "https://guard-dev.btfs.io", @@ -244,6 +246,7 @@ func DefaultServicesConfigDev() Services { func DefaultServicesConfigTestnet() Services { return Services{ StatusServerDomain: "https://status-staging.btfs.io", + OnlineServerDomain: "https://online-staging.btfs.io", HubDomain: "https://hub-staging.btfs.io", EscrowDomain: "https://escrow-staging.btfs.io", GuardDomain: "https://guard-staging.btfs.io", diff --git a/profile.go b/profile.go index 108629f..38fc53b 100644 --- a/profile.go +++ b/profile.go @@ -266,6 +266,8 @@ fetching may be degraded. c.Experimental.Libp2pStreamMounting = true c.Experimental.StorageHostEnabled = true c.Experimental.Analytics = true + c.Experimental.ReportOnline = true + c.Experimental.ReportStatus = true if len(c.Addresses.RemoteAPI) == 0 { c.Addresses.RemoteAPI = Strings{"/ip4/0.0.0.0/tcp/5101"} } @@ -399,6 +401,8 @@ func transformDevStorageHost(c *Config) error { c.Experimental.Libp2pStreamMounting = true c.Experimental.StorageHostEnabled = true c.Experimental.Analytics = true + c.Experimental.ReportOnline = true + c.Experimental.ReportStatus = true if len(c.Addresses.RemoteAPI) == 0 { c.Addresses.RemoteAPI = Strings{"/ip4/0.0.0.0/tcp/5101"} } diff --git a/services.go b/services.go index 6f039df..ff390eb 100644 --- a/services.go +++ b/services.go @@ -2,6 +2,7 @@ package config type Services struct { StatusServerDomain string + OnlineServerDomain string HubDomain string EscrowDomain string GuardDomain string