Initial commit, pt. 27

This commit is contained in:
Dmitrii Okunev
2024-06-30 19:49:35 +01:00
parent f09cfc9c61
commit a55c833866
22 changed files with 793 additions and 351 deletions

View File

@@ -2,16 +2,26 @@ package main
import (
"context"
"log"
"net"
"net/http"
_ "net/http/pprof"
"os"
"runtime"
"runtime/pprof"
"sync"
"github.com/facebookincubator/go-belt"
"github.com/facebookincubator/go-belt/tool/logger"
"github.com/facebookincubator/go-belt/tool/logger/implementation/zap"
"github.com/spf13/pflag"
"github.com/xaionaro-go/streamctl/cmd/streamd/ui"
"github.com/xaionaro-go/streamctl/pkg/streamd"
"github.com/xaionaro-go/streamctl/pkg/streamd/grpc/go/streamd_grpc"
"github.com/xaionaro-go/streamctl/pkg/streamd/server"
uiiface "github.com/xaionaro-go/streamctl/pkg/streamd/ui"
"github.com/xaionaro-go/streamctl/pkg/xpath"
"google.golang.org/grpc"
)
const forceNetPProfOnAndroid = true
@@ -19,6 +29,7 @@ const forceNetPProfOnAndroid = true
func main() {
loggerLevel := logger.LevelWarning
pflag.Var(&loggerLevel, "log-level", "Log level")
listenAddr := pflag.String("listen-addr", ":3594", "the address to listen for incoming connections to")
configPath := pflag.String("config-path", "/etc/streamd/streamd.yaml", "the path to the config file")
netPprofAddr := pflag.String("go-net-pprof-addr", "", "address to listen to for net/pprof requests")
cpuProfile := pflag.String("go-profile-cpu", "", "file to write cpu profile to")
@@ -72,4 +83,65 @@ func main() {
}
defer belt.Flush(ctx)
dataPath, err := xpath.Expand(*configPath)
if err != nil {
l.Fatalf("unable to get the path to the data file: %v", err)
}
var wg sync.WaitGroup
var cancelFunc context.CancelFunc
var _ui uiiface.UI
restart := func() {
l.Debugf("restart()")
if cancelFunc != nil {
l.Infof("cancelling the old server")
cancelFunc()
wg.Wait()
}
wg.Add(1)
defer wg.Done()
l.Infof("starting a server")
ctx, _cancelFunc := context.WithCancel(ctx)
cancelFunc = _cancelFunc
streamD, err := streamd.New(dataPath, _ui, belt.CtxBelt(ctx))
if err != nil {
l.Fatalf("unable to initialize the streamd instance: %v", err)
}
if err = streamD.Run(ctx); err != nil {
l.Fatalf("streamd exited with error: %v", err)
}
listener, err := net.Listen("tcp", *listenAddr)
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
go func() {
<-ctx.Done()
listener.Close()
}()
grpcServer := grpc.NewServer()
streamd_grpc.RegisterStreamDServer(grpcServer, server.NewGRPCServer(streamD))
l.Infof("started server at %s", *listenAddr)
err = grpcServer.Serve(listener)
if err != nil {
log.Fatal(err)
}
}
_ui = ui.NewUI(
ctx,
func(ctx context.Context, s string) {
restart()
},
)
restart()
<-ctx.Done()
}

85
cmd/streamd/ui/ui.go Normal file
View File

@@ -0,0 +1,85 @@
package ui
import (
"context"
"github.com/facebookincubator/go-belt"
"github.com/facebookincubator/go-belt/tool/logger"
"github.com/xaionaro-go/streamctl/pkg/oauthhandler"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol"
obs "github.com/xaionaro-go/streamctl/pkg/streamcontrol/obs/types"
twitch "github.com/xaionaro-go/streamctl/pkg/streamcontrol/twitch/types"
youtube "github.com/xaionaro-go/streamctl/pkg/streamcontrol/youtube/types"
streamd "github.com/xaionaro-go/streamctl/pkg/streamd/types"
"github.com/xaionaro-go/streamctl/pkg/streamd/ui"
)
type UI struct {
Belt *belt.Belt
RestartFn func(context.Context, string)
}
var _ ui.UI = (*UI)(nil)
func NewUI(
ctx context.Context,
restartFn func(context.Context, string),
) *UI {
return &UI{
Belt: belt.CtxBelt(ctx),
RestartFn: restartFn,
}
}
func (ui *UI) SetStatus(msg string) {
logger.FromBelt(ui.Belt).Infof("status: %s", msg)
}
func (ui *UI) DisplayError(err error) {
logger.FromBelt(ui.Belt).Errorf("error: %v", err)
}
func (ui *UI) Restart(ctx context.Context, msg string) {
ui.RestartFn(ctx, msg)
}
func (*UI) InputGitUserData(
ctx context.Context,
) (bool, string, []byte, error) {
return false, "", nil, nil
}
func (*UI) OAuthHandlerTwitch(
ctx context.Context,
arg oauthhandler.OAuthHandlerArgument,
) error {
return oauthhandler.OAuth2HandlerViaCLI(ctx, arg)
}
func (*UI) OAuthHandlerYouTube(
ctx context.Context,
arg oauthhandler.OAuthHandlerArgument,
) error {
return oauthhandler.OAuth2HandlerViaCLI(ctx, arg)
}
func (*UI) InputTwitchUserInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[twitch.PlatformSpecificConfig, twitch.StreamProfile],
) (bool, error) {
return false, streamd.ErrSkipBackend
}
func (*UI) InputYouTubeUserInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[youtube.PlatformSpecificConfig, youtube.StreamProfile],
) (bool, error) {
return false, streamd.ErrSkipBackend
}
func (*UI) InputOBSConnectInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[obs.PlatformSpecificConfig, obs.StreamProfile],
) (bool, error) {
return false, streamd.ErrSkipBackend
}

6
go.mod
View File

@@ -37,7 +37,6 @@ require (
github.com/go-text/render v0.1.0 // indirect
github.com/go-text/typesetting v0.1.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/gorilla/websocket v1.5.2 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
@@ -86,7 +85,6 @@ require (
github.com/golang-jwt/jwt/v4 v4.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-github/v62 v62.0.0
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
@@ -113,6 +111,6 @@ require (
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415141817-7cd4c1c1f9ec // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.0
)

6
go.sum
View File

@@ -224,10 +224,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v62 v62.0.0 h1:/6mGCaRywZz9MuHyw9gD1CwsbmBX8GWsbFkwMmHdhl4=
github.com/google/go-github/v62 v62.0.0/go.mod h1:EMxeUqGJq2xRu9DYBMwel/mr7kZrzUOfQmmpYrZn2a4=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -556,8 +552,6 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=

View File

@@ -2,24 +2,15 @@ package obs
import (
streamctl "github.com/xaionaro-go/streamctl/pkg/streamcontrol"
obs "github.com/xaionaro-go/streamctl/pkg/streamcontrol/obs/types"
)
const ID = streamctl.PlatformName("obs")
const ID = obs.ID
type PlatformSpecificConfig struct {
Host string
Port uint16
Password string `yaml:"pass" json:"pass"`
}
type Config = streamctl.PlatformConfig[PlatformSpecificConfig, StreamProfile]
type Config = obs.Config
type StreamProfile = obs.StreamProfile
type PlatformSpecificConfig = obs.PlatformSpecificConfig
func InitConfig(cfg streamctl.Config) {
streamctl.InitConfig(cfg, ID, Config{})
}
type StreamProfile struct {
streamctl.StreamProfileBase `yaml:",omitempty,inline,alias"`
EnableRecording bool `yaml:"enable_recording" json:"enable_recording"`
obs.InitConfig(cfg)
}

View File

@@ -0,0 +1,25 @@
package obs
import (
streamctl "github.com/xaionaro-go/streamctl/pkg/streamcontrol"
)
const ID = streamctl.PlatformName("obs")
type PlatformSpecificConfig struct {
Host string
Port uint16
Password string `yaml:"pass" json:"pass"`
}
type Config = streamctl.PlatformConfig[PlatformSpecificConfig, StreamProfile]
func InitConfig(cfg streamctl.Config) {
streamctl.InitConfig(cfg, ID, Config{})
}
type StreamProfile struct {
streamctl.StreamProfileBase `yaml:",omitempty,inline,alias"`
EnableRecording bool `yaml:"enable_recording" json:"enable_recording"`
}

View File

@@ -1,39 +1,17 @@
package twitch
import (
"context"
"github.com/xaionaro-go/streamctl/pkg/oauthhandler"
streamctl "github.com/xaionaro-go/streamctl/pkg/streamcontrol"
twitch "github.com/xaionaro-go/streamctl/pkg/streamcontrol/twitch/types"
)
const ID = streamctl.PlatformName("twitch")
const ID = twitch.ID
type OAuthHandler func(context.Context, oauthhandler.OAuthHandlerArgument) error
type PlatformSpecificConfig struct {
Channel string
ClientID string
ClientSecret string
ClientCode string
AuthType string
AppAccessToken string
UserAccessToken string
RefreshToken string
CustomOAuthHandler OAuthHandler `yaml:"-"`
}
type Config = streamctl.PlatformConfig[PlatformSpecificConfig, StreamProfile]
type Config = twitch.Config
type StreamProfile = twitch.StreamProfile
type PlatformSpecificConfig = twitch.PlatformSpecificConfig
type OAuthHandler = twitch.OAuthHandler
func InitConfig(cfg streamctl.Config) {
streamctl.InitConfig(cfg, ID, Config{})
}
type StreamProfile struct {
streamctl.StreamProfileBase `yaml:",omitempty,inline,alias"`
Tags [10]string
Language *string
CategoryName *string
CategoryID *string
twitch.InitConfig(cfg)
}

View File

@@ -0,0 +1,39 @@
package twitch
import (
"context"
"github.com/xaionaro-go/streamctl/pkg/oauthhandler"
streamctl "github.com/xaionaro-go/streamctl/pkg/streamcontrol"
)
const ID = streamctl.PlatformName("twitch")
type OAuthHandler func(context.Context, oauthhandler.OAuthHandlerArgument) error
type PlatformSpecificConfig struct {
Channel string
ClientID string
ClientSecret string
ClientCode string
AuthType string
AppAccessToken string
UserAccessToken string
RefreshToken string
CustomOAuthHandler OAuthHandler `yaml:"-"`
}
type Config = streamctl.PlatformConfig[PlatformSpecificConfig, StreamProfile]
func InitConfig(cfg streamctl.Config) {
streamctl.InitConfig(cfg, ID, Config{})
}
type StreamProfile struct {
streamctl.StreamProfileBase `yaml:",omitempty,inline,alias"`
Tags [10]string
Language *string
CategoryName *string
CategoryID *string
}

View File

@@ -1,34 +1,17 @@
package youtube
import (
"context"
"github.com/xaionaro-go/streamctl/pkg/oauthhandler"
streamctl "github.com/xaionaro-go/streamctl/pkg/streamcontrol"
"golang.org/x/oauth2"
youtube "github.com/xaionaro-go/streamctl/pkg/streamcontrol/youtube/types"
)
const ID = streamctl.PlatformName("youtube")
const ID = youtube.ID
type OAuthHandler func(context.Context, oauthhandler.OAuthHandlerArgument) error
type PlatformSpecificConfig struct {
ClientID string
ClientSecret string
Token *oauth2.Token
CustomOAuthHandler OAuthHandler `yaml:"-"`
}
type Config = streamctl.PlatformConfig[PlatformSpecificConfig, StreamProfile]
type OAuthHandler = youtube.OAuthHandler
type Config = youtube.Config
type StreamProfile = youtube.StreamProfile
type PlatformSpecificConfig = youtube.PlatformSpecificConfig
func InitConfig(cfg streamctl.Config) {
streamctl.InitConfig(cfg, ID, Config{})
}
type StreamProfile struct {
streamctl.StreamProfileBase `yaml:",omitempty,inline,alias"`
AutoNumerate bool
TemplateBroadcastIDs []string
Tags []string
youtube.InitConfig(cfg)
}

View File

@@ -0,0 +1,34 @@
package youtube
import (
"context"
"github.com/xaionaro-go/streamctl/pkg/oauthhandler"
streamctl "github.com/xaionaro-go/streamctl/pkg/streamcontrol"
"golang.org/x/oauth2"
)
const ID = streamctl.PlatformName("youtube")
type OAuthHandler func(context.Context, oauthhandler.OAuthHandlerArgument) error
type PlatformSpecificConfig struct {
ClientID string
ClientSecret string
Token *oauth2.Token
CustomOAuthHandler OAuthHandler `yaml:"-"`
}
type Config = streamctl.PlatformConfig[PlatformSpecificConfig, StreamProfile]
func InitConfig(cfg streamctl.Config) {
streamctl.InitConfig(cfg, ID, Config{})
}
type StreamProfile struct {
streamctl.StreamProfileBase `yaml:",omitempty,inline,alias"`
AutoNumerate bool
TemplateBroadcastIDs []string
Tags []string
}

View File

@@ -9,19 +9,15 @@ import (
)
type StreamD interface {
Run(ctx context.Context) error
FetchConfig(ctx context.Context) error
ResetCache(ctx context.Context) error
InitCache(ctx context.Context) error
SetPlatformConfig(
ctx context.Context,
platID streamcontrol.PlatformName,
platCfg *streamcontrol.AbstractPlatformConfig,
) error
SaveConfig(ctx context.Context) error
GetConfig(ctx context.Context) (*config.Config, error)
SetConfig(ctx context.Context, cfg *config.Config) error
IsBackendEnabled(ctx context.Context, id streamcontrol.PlatformName) (bool, error)
IsGITInitialized(ctx context.Context) (bool, error)
OBSOLETE_IsGITInitialized(ctx context.Context) (bool, error)
StartStream(
ctx context.Context,
platID streamcontrol.PlatformName,
@@ -30,9 +26,10 @@ type StreamD interface {
customArgs ...any,
) error
EndStream(ctx context.Context, platID streamcontrol.PlatformName) error
GitRelogin(ctx context.Context) error
OBSOLETE_GitRelogin(ctx context.Context) error
GetBackendData(ctx context.Context, platID streamcontrol.PlatformName) (any, error)
Restart(ctx context.Context) error
EXPERIMENTAL_ReinitStreamControllers(ctx context.Context) error
}
type BackendDataOBS struct{}

View File

@@ -7,6 +7,9 @@ import (
"net/url"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol"
obs "github.com/xaionaro-go/streamctl/pkg/streamcontrol/obs/types"
twitch "github.com/xaionaro-go/streamctl/pkg/streamcontrol/twitch/types"
youtube "github.com/xaionaro-go/streamctl/pkg/streamcontrol/youtube/types"
"github.com/xaionaro-go/streamctl/pkg/streamd/api"
"github.com/xaionaro-go/streamctl/pkg/streamd/config"
"github.com/xaionaro-go/streamctl/pkg/streamd/grpc/go/streamd_grpc"
@@ -33,6 +36,10 @@ func (c *Client) grpcClient() (streamd_grpc.StreamDClient, *grpc.ClientConn, err
return client, conn, nil
}
func (c *Client) Run(ctx context.Context) error {
return nil
}
func (c *Client) FetchConfig(ctx context.Context) error {
client, conn, err := c.grpcClient()
if err != nil {
@@ -55,14 +62,6 @@ func (c *Client) InitCache(ctx context.Context) error {
return err
}
func (c *Client) SetPlatformConfig(
ctx context.Context,
platID streamcontrol.PlatformName,
platCfg *streamcontrol.AbstractPlatformConfig,
) error {
panic("not implemented")
}
func (c *Client) SaveConfig(ctx context.Context) error {
client, conn, err := c.grpcClient()
if err != nil {
@@ -96,12 +95,13 @@ func (c *Client) GetConfig(ctx context.Context) (*config.Config, error) {
if err != nil {
return nil, fmt.Errorf("unable to request the config: %w", err)
}
var config config.Config
err = json.Unmarshal([]byte(reply.Config), &config)
var result config.Config
err = config.ReadConfig(ctx, []byte(reply.Config), &result)
if err != nil {
return nil, fmt.Errorf("unable to unserialize the received config: %w", err)
}
return &config, nil
return &result, nil
}
func (c *Client) SetConfig(ctx context.Context, cfg *config.Config) error {
@@ -140,7 +140,7 @@ func (c *Client) IsBackendEnabled(ctx context.Context, id streamcontrol.Platform
return reply.IsInitialized, nil
}
func (c *Client) IsGITInitialized(ctx context.Context) (bool, error) {
func (c *Client) OBSOLETE_IsGITInitialized(ctx context.Context) (bool, error) {
client, conn, err := c.grpcClient()
if err != nil {
return false, err
@@ -199,7 +199,7 @@ func (c *Client) EndStream(ctx context.Context, platID streamcontrol.PlatformNam
return nil
}
func (c *Client) GitRelogin(ctx context.Context) error {
func (c *Client) OBSOLETE_GitRelogin(ctx context.Context) error {
client, conn, err := c.grpcClient()
if err != nil {
return err
@@ -215,7 +215,36 @@ func (c *Client) GitRelogin(ctx context.Context) error {
}
func (c *Client) GetBackendData(ctx context.Context, platID streamcontrol.PlatformName) (any, error) {
panic("not implemented")
client, conn, err := c.grpcClient()
if err != nil {
return nil, err
}
defer conn.Close()
reply, err := client.GetBackendInfo(ctx, &streamd_grpc.GetBackendInfoRequest{
PlatID: string(platID),
})
if err != nil {
return nil, fmt.Errorf("unable to get backend info: %w", err)
}
var data any
switch platID {
case obs.ID:
data = &api.BackendDataOBS{}
case twitch.ID:
data = &api.BackendDataTwitch{}
case youtube.ID:
data = &api.BackendDataYouTube{}
default:
return nil, fmt.Errorf("unknown platform: '%s'", platID)
}
err = json.Unmarshal([]byte(reply.GetData()), data)
if err != nil {
return nil, fmt.Errorf("unable to deserialize data: %w", err)
}
return data, nil
}
func (c *Client) Restart(ctx context.Context) error {
@@ -232,3 +261,19 @@ func (c *Client) Restart(ctx context.Context) error {
return nil
}
func (c *Client) EXPERIMENTAL_ReinitStreamControllers(ctx context.Context) error {
client, conn, err := c.grpcClient()
if err != nil {
return err
}
defer conn.Close()
_, err = client.EXPERIMENTAL_ReinitStreamControllers(ctx, &streamd_grpc.EXPERIMENTAL_ReinitStreamControllersRequest{})
if err != nil {
return fmt.Errorf("unable restart the server: %w", err)
}
return nil
}

View File

@@ -223,7 +223,7 @@ func (d *StreamD) startPeriodicGitSyncer(ctx context.Context) {
}()
}
func (d *StreamD) GitRelogin(ctx context.Context) error {
func (d *StreamD) OBSOLETE_GitRelogin(ctx context.Context) error {
alreadyLoggedIn := d.GitStorage != nil
oldCfg := d.Config.GitRepo
d.Config.GitRepo = config.GitRepoConfig{}

View File

@@ -790,6 +790,82 @@ func (*RestartReply) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{17}
}
type EXPERIMENTAL_ReinitStreamControllersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *EXPERIMENTAL_ReinitStreamControllersRequest) Reset() {
*x = EXPERIMENTAL_ReinitStreamControllersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EXPERIMENTAL_ReinitStreamControllersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EXPERIMENTAL_ReinitStreamControllersRequest) ProtoMessage() {}
func (x *EXPERIMENTAL_ReinitStreamControllersRequest) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EXPERIMENTAL_ReinitStreamControllersRequest.ProtoReflect.Descriptor instead.
func (*EXPERIMENTAL_ReinitStreamControllersRequest) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{18}
}
type EXPERIMENTAL_ReinitStreamControllersReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *EXPERIMENTAL_ReinitStreamControllersReply) Reset() {
*x = EXPERIMENTAL_ReinitStreamControllersReply{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EXPERIMENTAL_ReinitStreamControllersReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EXPERIMENTAL_ReinitStreamControllersReply) ProtoMessage() {}
func (x *EXPERIMENTAL_ReinitStreamControllersReply) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EXPERIMENTAL_ReinitStreamControllersReply.ProtoReflect.Descriptor instead.
func (*EXPERIMENTAL_ReinitStreamControllersReply) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{19}
}
type OBSOLETE_FetchConfigRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -799,7 +875,7 @@ type OBSOLETE_FetchConfigRequest struct {
func (x *OBSOLETE_FetchConfigRequest) Reset() {
*x = OBSOLETE_FetchConfigRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[18]
mi := &file_streamd_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -812,7 +888,7 @@ func (x *OBSOLETE_FetchConfigRequest) String() string {
func (*OBSOLETE_FetchConfigRequest) ProtoMessage() {}
func (x *OBSOLETE_FetchConfigRequest) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[18]
mi := &file_streamd_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -825,7 +901,7 @@ func (x *OBSOLETE_FetchConfigRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use OBSOLETE_FetchConfigRequest.ProtoReflect.Descriptor instead.
func (*OBSOLETE_FetchConfigRequest) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{18}
return file_streamd_proto_rawDescGZIP(), []int{20}
}
type OBSOLETE_FetchConfigReply struct {
@@ -837,7 +913,7 @@ type OBSOLETE_FetchConfigReply struct {
func (x *OBSOLETE_FetchConfigReply) Reset() {
*x = OBSOLETE_FetchConfigReply{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[19]
mi := &file_streamd_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -850,7 +926,7 @@ func (x *OBSOLETE_FetchConfigReply) String() string {
func (*OBSOLETE_FetchConfigReply) ProtoMessage() {}
func (x *OBSOLETE_FetchConfigReply) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[19]
mi := &file_streamd_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -863,7 +939,7 @@ func (x *OBSOLETE_FetchConfigReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use OBSOLETE_FetchConfigReply.ProtoReflect.Descriptor instead.
func (*OBSOLETE_FetchConfigReply) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{19}
return file_streamd_proto_rawDescGZIP(), []int{21}
}
type OBSOLETE_GetGitInfoRequest struct {
@@ -875,7 +951,7 @@ type OBSOLETE_GetGitInfoRequest struct {
func (x *OBSOLETE_GetGitInfoRequest) Reset() {
*x = OBSOLETE_GetGitInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[20]
mi := &file_streamd_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -888,7 +964,7 @@ func (x *OBSOLETE_GetGitInfoRequest) String() string {
func (*OBSOLETE_GetGitInfoRequest) ProtoMessage() {}
func (x *OBSOLETE_GetGitInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[20]
mi := &file_streamd_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -901,7 +977,7 @@ func (x *OBSOLETE_GetGitInfoRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use OBSOLETE_GetGitInfoRequest.ProtoReflect.Descriptor instead.
func (*OBSOLETE_GetGitInfoRequest) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{20}
return file_streamd_proto_rawDescGZIP(), []int{22}
}
type OBSOLETE_GetGitInfoReply struct {
@@ -915,7 +991,7 @@ type OBSOLETE_GetGitInfoReply struct {
func (x *OBSOLETE_GetGitInfoReply) Reset() {
*x = OBSOLETE_GetGitInfoReply{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[21]
mi := &file_streamd_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -928,7 +1004,7 @@ func (x *OBSOLETE_GetGitInfoReply) String() string {
func (*OBSOLETE_GetGitInfoReply) ProtoMessage() {}
func (x *OBSOLETE_GetGitInfoReply) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[21]
mi := &file_streamd_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -941,7 +1017,7 @@ func (x *OBSOLETE_GetGitInfoReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use OBSOLETE_GetGitInfoReply.ProtoReflect.Descriptor instead.
func (*OBSOLETE_GetGitInfoReply) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{21}
return file_streamd_proto_rawDescGZIP(), []int{23}
}
func (x *OBSOLETE_GetGitInfoReply) GetIsInitialized() bool {
@@ -960,7 +1036,7 @@ type OBSOLETE_GitReloginRequest struct {
func (x *OBSOLETE_GitReloginRequest) Reset() {
*x = OBSOLETE_GitReloginRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[22]
mi := &file_streamd_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -973,7 +1049,7 @@ func (x *OBSOLETE_GitReloginRequest) String() string {
func (*OBSOLETE_GitReloginRequest) ProtoMessage() {}
func (x *OBSOLETE_GitReloginRequest) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[22]
mi := &file_streamd_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -986,7 +1062,7 @@ func (x *OBSOLETE_GitReloginRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use OBSOLETE_GitReloginRequest.ProtoReflect.Descriptor instead.
func (*OBSOLETE_GitReloginRequest) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{22}
return file_streamd_proto_rawDescGZIP(), []int{24}
}
type OBSOLETE_GitReloginReply struct {
@@ -998,7 +1074,7 @@ type OBSOLETE_GitReloginReply struct {
func (x *OBSOLETE_GitReloginReply) Reset() {
*x = OBSOLETE_GitReloginReply{}
if protoimpl.UnsafeEnabled {
mi := &file_streamd_proto_msgTypes[23]
mi := &file_streamd_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1011,7 +1087,7 @@ func (x *OBSOLETE_GitReloginReply) String() string {
func (*OBSOLETE_GitReloginReply) ProtoMessage() {}
func (x *OBSOLETE_GitReloginReply) ProtoReflect() protoreflect.Message {
mi := &file_streamd_proto_msgTypes[23]
mi := &file_streamd_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1024,7 +1100,7 @@ func (x *OBSOLETE_GitReloginReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use OBSOLETE_GitReloginReply.ProtoReflect.Descriptor instead.
func (*OBSOLETE_GitReloginReply) Descriptor() ([]byte, []int) {
return file_streamd_proto_rawDescGZIP(), []int{23}
return file_streamd_proto_rawDescGZIP(), []int{25}
}
var File_streamd_proto protoreflect.FileDescriptor
@@ -1069,68 +1145,82 @@ var file_streamd_proto_rawDesc = []byte{
0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x74, 0x61,
0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x4f, 0x42, 0x53, 0x4f, 0x4c,
0x45, 0x54, 0x45, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45,
0x54, 0x45, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f,
0x47, 0x65, 0x74, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x40, 0x0a, 0x18, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65,
0x74, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a,
0x0d, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69,
0x7a, 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f,
0x47, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x1a, 0x0a, 0x18, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69,
0x74, 0x52, 0x65, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xdc, 0x05,
0x0a, 0x07, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x12, 0x31, 0x0a, 0x09, 0x47, 0x65, 0x74,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x09,
0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x11, 0x2e, 0x53, 0x65, 0x74, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53,
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
0x34, 0x0a, 0x0a, 0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x2e,
0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x10, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x61,
0x63, 0x68, 0x65, 0x12, 0x12, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43,
0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x09, 0x49,
0x6e, 0x69, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x11, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x43,
0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x49, 0x6e,
0x69, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37,
0x0a, 0x0b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x13, 0x2e,
0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x11, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x09, 0x45, 0x6e, 0x64, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x12, 0x11, 0x2e, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x47,
0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e,
0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x07,
0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61,
0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x14, 0x4f, 0x42, 0x53,
0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x1c, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x65, 0x74,
0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1a, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4c, 0x0a,
0x10, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x1b, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65, 0x74,
0x47, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65, 0x74, 0x47, 0x69, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x13, 0x4f,
0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x6f, 0x67,
0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69,
0x74, 0x52, 0x65, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x19, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x52, 0x65,
0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x11, 0x5a, 0x0f,
0x67, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x64, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2d, 0x0a, 0x2b, 0x45, 0x58, 0x50, 0x45, 0x52,
0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x65, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x29, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49,
0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x65, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f,
0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46,
0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x1c, 0x0a, 0x1a, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65, 0x74, 0x47,
0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a,
0x18, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65, 0x74, 0x47, 0x69, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x49,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0d, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22,
0x1c, 0x0a, 0x1a, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x52,
0x65, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1a, 0x0a,
0x18, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x52, 0x65, 0x6c,
0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xe1, 0x06, 0x0a, 0x07, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x44, 0x12, 0x31, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x11, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x0a, 0x53,
0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x2e, 0x53, 0x61, 0x76, 0x65,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e,
0x53, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x00, 0x12, 0x34, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12,
0x12, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x43,
0x61, 0x63, 0x68, 0x65, 0x12, 0x11, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x61,
0x63, 0x68, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0b, 0x53, 0x74,
0x61, 0x72, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x13, 0x2e, 0x53, 0x74, 0x61, 0x72,
0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,
0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x09, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x12, 0x11, 0x2e, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63,
0x6b, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61,
0x63, 0x6b, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74,
0x61, 0x72, 0x74, 0x12, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x24, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49,
0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x65, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x2c,
0x2e, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x65,
0x69, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x45,
0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x65, 0x69, 0x6e,
0x69, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x14, 0x4f, 0x42,
0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x12, 0x1c, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x65,
0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1a, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x65, 0x74, 0x63,
0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4c,
0x0a, 0x10, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65,
0x74, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x19, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x65, 0x74, 0x47, 0x69,
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x13,
0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47,
0x69, 0x74, 0x52, 0x65, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x4f, 0x42, 0x53, 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x47, 0x69, 0x74, 0x52,
0x65, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x11, 0x5a,
0x0f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x64, 0x5f, 0x67, 0x72, 0x70, 0x63,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1145,7 +1235,7 @@ func file_streamd_proto_rawDescGZIP() []byte {
return file_streamd_proto_rawDescData
}
var file_streamd_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
var file_streamd_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_streamd_proto_goTypes = []interface{}{
(*GetConfigRequest)(nil), // 0: GetConfigRequest
(*GetConfigReply)(nil), // 1: GetConfigReply
@@ -1165,12 +1255,14 @@ var file_streamd_proto_goTypes = []interface{}{
(*GetBackendInfoReply)(nil), // 15: GetBackendInfoReply
(*RestartRequest)(nil), // 16: RestartRequest
(*RestartReply)(nil), // 17: RestartReply
(*OBSOLETE_FetchConfigRequest)(nil), // 18: OBSOLETE_FetchConfigRequest
(*OBSOLETE_FetchConfigReply)(nil), // 19: OBSOLETE_FetchConfigReply
(*OBSOLETE_GetGitInfoRequest)(nil), // 20: OBSOLETE_GetGitInfoRequest
(*OBSOLETE_GetGitInfoReply)(nil), // 21: OBSOLETE_GetGitInfoReply
(*OBSOLETE_GitReloginRequest)(nil), // 22: OBSOLETE_GitReloginRequest
(*OBSOLETE_GitReloginReply)(nil), // 23: OBSOLETE_GitReloginReply
(*EXPERIMENTAL_ReinitStreamControllersRequest)(nil), // 18: EXPERIMENTAL_ReinitStreamControllersRequest
(*EXPERIMENTAL_ReinitStreamControllersReply)(nil), // 19: EXPERIMENTAL_ReinitStreamControllersReply
(*OBSOLETE_FetchConfigRequest)(nil), // 20: OBSOLETE_FetchConfigRequest
(*OBSOLETE_FetchConfigReply)(nil), // 21: OBSOLETE_FetchConfigReply
(*OBSOLETE_GetGitInfoRequest)(nil), // 22: OBSOLETE_GetGitInfoRequest
(*OBSOLETE_GetGitInfoReply)(nil), // 23: OBSOLETE_GetGitInfoReply
(*OBSOLETE_GitReloginRequest)(nil), // 24: OBSOLETE_GitReloginRequest
(*OBSOLETE_GitReloginReply)(nil), // 25: OBSOLETE_GitReloginReply
}
var file_streamd_proto_depIdxs = []int32{
0, // 0: StreamD.GetConfig:input_type -> GetConfigRequest
@@ -1182,23 +1274,25 @@ var file_streamd_proto_depIdxs = []int32{
12, // 6: StreamD.EndStream:input_type -> EndStreamRequest
14, // 7: StreamD.GetBackendInfo:input_type -> GetBackendInfoRequest
16, // 8: StreamD.Restart:input_type -> RestartRequest
18, // 9: StreamD.OBSOLETE_FetchConfig:input_type -> OBSOLETE_FetchConfigRequest
20, // 10: StreamD.OBSOLETE_GitInfo:input_type -> OBSOLETE_GetGitInfoRequest
22, // 11: StreamD.OBSOLETE_GitRelogin:input_type -> OBSOLETE_GitReloginRequest
1, // 12: StreamD.GetConfig:output_type -> GetConfigReply
3, // 13: StreamD.SetConfig:output_type -> SetConfigReply
5, // 14: StreamD.SaveConfig:output_type -> SaveConfigReply
7, // 15: StreamD.ResetCache:output_type -> ResetCacheReply
9, // 16: StreamD.InitCache:output_type -> InitCacheReply
11, // 17: StreamD.StartStream:output_type -> StartStreamReply
13, // 18: StreamD.EndStream:output_type -> EndStreamReply
15, // 19: StreamD.GetBackendInfo:output_type -> GetBackendInfoReply
17, // 20: StreamD.Restart:output_type -> RestartReply
19, // 21: StreamD.OBSOLETE_FetchConfig:output_type -> OBSOLETE_FetchConfigReply
21, // 22: StreamD.OBSOLETE_GitInfo:output_type -> OBSOLETE_GetGitInfoReply
23, // 23: StreamD.OBSOLETE_GitRelogin:output_type -> OBSOLETE_GitReloginReply
12, // [12:24] is the sub-list for method output_type
0, // [0:12] is the sub-list for method input_type
18, // 9: StreamD.EXPERIMENTAL_ReinitStreamControllers:input_type -> EXPERIMENTAL_ReinitStreamControllersRequest
20, // 10: StreamD.OBSOLETE_FetchConfig:input_type -> OBSOLETE_FetchConfigRequest
22, // 11: StreamD.OBSOLETE_GitInfo:input_type -> OBSOLETE_GetGitInfoRequest
24, // 12: StreamD.OBSOLETE_GitRelogin:input_type -> OBSOLETE_GitReloginRequest
1, // 13: StreamD.GetConfig:output_type -> GetConfigReply
3, // 14: StreamD.SetConfig:output_type -> SetConfigReply
5, // 15: StreamD.SaveConfig:output_type -> SaveConfigReply
7, // 16: StreamD.ResetCache:output_type -> ResetCacheReply
9, // 17: StreamD.InitCache:output_type -> InitCacheReply
11, // 18: StreamD.StartStream:output_type -> StartStreamReply
13, // 19: StreamD.EndStream:output_type -> EndStreamReply
15, // 20: StreamD.GetBackendInfo:output_type -> GetBackendInfoReply
17, // 21: StreamD.Restart:output_type -> RestartReply
19, // 22: StreamD.EXPERIMENTAL_ReinitStreamControllers:output_type -> EXPERIMENTAL_ReinitStreamControllersReply
21, // 23: StreamD.OBSOLETE_FetchConfig:output_type -> OBSOLETE_FetchConfigReply
23, // 24: StreamD.OBSOLETE_GitInfo:output_type -> OBSOLETE_GetGitInfoReply
25, // 25: StreamD.OBSOLETE_GitRelogin:output_type -> OBSOLETE_GitReloginReply
13, // [13:26] is the sub-list for method output_type
0, // [0:13] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
@@ -1427,7 +1521,7 @@ func file_streamd_proto_init() {
}
}
file_streamd_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_FetchConfigRequest); i {
switch v := v.(*EXPERIMENTAL_ReinitStreamControllersRequest); i {
case 0:
return &v.state
case 1:
@@ -1439,7 +1533,7 @@ func file_streamd_proto_init() {
}
}
file_streamd_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_FetchConfigReply); i {
switch v := v.(*EXPERIMENTAL_ReinitStreamControllersReply); i {
case 0:
return &v.state
case 1:
@@ -1451,7 +1545,7 @@ func file_streamd_proto_init() {
}
}
file_streamd_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_GetGitInfoRequest); i {
switch v := v.(*OBSOLETE_FetchConfigRequest); i {
case 0:
return &v.state
case 1:
@@ -1463,7 +1557,7 @@ func file_streamd_proto_init() {
}
}
file_streamd_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_GetGitInfoReply); i {
switch v := v.(*OBSOLETE_FetchConfigReply); i {
case 0:
return &v.state
case 1:
@@ -1475,7 +1569,7 @@ func file_streamd_proto_init() {
}
}
file_streamd_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_GitReloginRequest); i {
switch v := v.(*OBSOLETE_GetGitInfoRequest); i {
case 0:
return &v.state
case 1:
@@ -1487,6 +1581,30 @@ func file_streamd_proto_init() {
}
}
file_streamd_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_GetGitInfoReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_streamd_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_GitReloginRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_streamd_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OBSOLETE_GitReloginReply); i {
case 0:
return &v.state
@@ -1505,7 +1623,7 @@ func file_streamd_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_streamd_proto_rawDesc,
NumEnums: 0,
NumMessages: 24,
NumMessages: 26,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -31,6 +31,7 @@ type StreamDClient interface {
EndStream(ctx context.Context, in *EndStreamRequest, opts ...grpc.CallOption) (*EndStreamReply, error)
GetBackendInfo(ctx context.Context, in *GetBackendInfoRequest, opts ...grpc.CallOption) (*GetBackendInfoReply, error)
Restart(ctx context.Context, in *RestartRequest, opts ...grpc.CallOption) (*RestartReply, error)
EXPERIMENTAL_ReinitStreamControllers(ctx context.Context, in *EXPERIMENTAL_ReinitStreamControllersRequest, opts ...grpc.CallOption) (*EXPERIMENTAL_ReinitStreamControllersReply, error)
OBSOLETE_FetchConfig(ctx context.Context, in *OBSOLETE_FetchConfigRequest, opts ...grpc.CallOption) (*OBSOLETE_FetchConfigReply, error)
OBSOLETE_GitInfo(ctx context.Context, in *OBSOLETE_GetGitInfoRequest, opts ...grpc.CallOption) (*OBSOLETE_GetGitInfoReply, error)
OBSOLETE_GitRelogin(ctx context.Context, in *OBSOLETE_GitReloginRequest, opts ...grpc.CallOption) (*OBSOLETE_GitReloginReply, error)
@@ -125,6 +126,15 @@ func (c *streamDClient) Restart(ctx context.Context, in *RestartRequest, opts ..
return out, nil
}
func (c *streamDClient) EXPERIMENTAL_ReinitStreamControllers(ctx context.Context, in *EXPERIMENTAL_ReinitStreamControllersRequest, opts ...grpc.CallOption) (*EXPERIMENTAL_ReinitStreamControllersReply, error) {
out := new(EXPERIMENTAL_ReinitStreamControllersReply)
err := c.cc.Invoke(ctx, "/StreamD/EXPERIMENTAL_ReinitStreamControllers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *streamDClient) OBSOLETE_FetchConfig(ctx context.Context, in *OBSOLETE_FetchConfigRequest, opts ...grpc.CallOption) (*OBSOLETE_FetchConfigReply, error) {
out := new(OBSOLETE_FetchConfigReply)
err := c.cc.Invoke(ctx, "/StreamD/OBSOLETE_FetchConfig", in, out, opts...)
@@ -165,6 +175,7 @@ type StreamDServer interface {
EndStream(context.Context, *EndStreamRequest) (*EndStreamReply, error)
GetBackendInfo(context.Context, *GetBackendInfoRequest) (*GetBackendInfoReply, error)
Restart(context.Context, *RestartRequest) (*RestartReply, error)
EXPERIMENTAL_ReinitStreamControllers(context.Context, *EXPERIMENTAL_ReinitStreamControllersRequest) (*EXPERIMENTAL_ReinitStreamControllersReply, error)
OBSOLETE_FetchConfig(context.Context, *OBSOLETE_FetchConfigRequest) (*OBSOLETE_FetchConfigReply, error)
OBSOLETE_GitInfo(context.Context, *OBSOLETE_GetGitInfoRequest) (*OBSOLETE_GetGitInfoReply, error)
OBSOLETE_GitRelogin(context.Context, *OBSOLETE_GitReloginRequest) (*OBSOLETE_GitReloginReply, error)
@@ -202,6 +213,9 @@ func (UnimplementedStreamDServer) GetBackendInfo(context.Context, *GetBackendInf
func (UnimplementedStreamDServer) Restart(context.Context, *RestartRequest) (*RestartReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Restart not implemented")
}
func (UnimplementedStreamDServer) EXPERIMENTAL_ReinitStreamControllers(context.Context, *EXPERIMENTAL_ReinitStreamControllersRequest) (*EXPERIMENTAL_ReinitStreamControllersReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method EXPERIMENTAL_ReinitStreamControllers not implemented")
}
func (UnimplementedStreamDServer) OBSOLETE_FetchConfig(context.Context, *OBSOLETE_FetchConfigRequest) (*OBSOLETE_FetchConfigReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method OBSOLETE_FetchConfig not implemented")
}
@@ -386,6 +400,24 @@ func _StreamD_Restart_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
func _StreamD_EXPERIMENTAL_ReinitStreamControllers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EXPERIMENTAL_ReinitStreamControllersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StreamDServer).EXPERIMENTAL_ReinitStreamControllers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/StreamD/EXPERIMENTAL_ReinitStreamControllers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamDServer).EXPERIMENTAL_ReinitStreamControllers(ctx, req.(*EXPERIMENTAL_ReinitStreamControllersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _StreamD_OBSOLETE_FetchConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OBSOLETE_FetchConfigRequest)
if err := dec(in); err != nil {
@@ -483,6 +515,10 @@ var StreamD_ServiceDesc = grpc.ServiceDesc{
MethodName: "Restart",
Handler: _StreamD_Restart_Handler,
},
{
MethodName: "EXPERIMENTAL_ReinitStreamControllers",
Handler: _StreamD_EXPERIMENTAL_ReinitStreamControllers_Handler,
},
{
MethodName: "OBSOLETE_FetchConfig",
Handler: _StreamD_OBSOLETE_FetchConfig_Handler,

View File

@@ -12,6 +12,8 @@ service StreamD {
rpc GetBackendInfo(GetBackendInfoRequest) returns (GetBackendInfoReply) {}
rpc Restart(RestartRequest) returns (RestartReply) {}
rpc EXPERIMENTAL_ReinitStreamControllers(EXPERIMENTAL_ReinitStreamControllersRequest) returns (EXPERIMENTAL_ReinitStreamControllersReply) {}
rpc OBSOLETE_FetchConfig(OBSOLETE_FetchConfigRequest) returns (OBSOLETE_FetchConfigReply) {}
rpc OBSOLETE_GitInfo(OBSOLETE_GetGitInfoRequest) returns (OBSOLETE_GetGitInfoReply) {}
rpc OBSOLETE_GitRelogin(OBSOLETE_GitReloginRequest) returns (OBSOLETE_GitReloginReply) {}
@@ -52,6 +54,9 @@ message GetBackendInfoReply {
message RestartRequest {}
message RestartReply {}
message EXPERIMENTAL_ReinitStreamControllersRequest {}
message EXPERIMENTAL_ReinitStreamControllersReply {}
message OBSOLETE_FetchConfigRequest {}
message OBSOLETE_FetchConfigReply {}
message OBSOLETE_GetGitInfoRequest {}

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"github.com/goccy/go-yaml"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol/obs"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol/twitch"
@@ -48,13 +49,13 @@ func (grpc *GRPCServer) SetConfig(
ctx context.Context,
req *streamd_grpc.SetConfigRequest,
) (*streamd_grpc.SetConfigReply, error) {
var config config.Config
err := json.Unmarshal([]byte(req.Config), &config)
var result config.Config
err := config.ReadConfig(ctx, []byte(req.Config), &result)
if err != nil {
return nil, fmt.Errorf("unable to unserialize the config: %w", err)
}
err = grpc.StreamD.SetConfig(ctx, &config)
err = grpc.StreamD.SetConfig(ctx, &result)
if err != nil {
return nil, fmt.Errorf("unable to set the config: %w", err)
}
@@ -112,7 +113,7 @@ func (grpc *GRPCServer) StartStream(
default:
return nil, fmt.Errorf("unexpected platform ID: '%s'", platID)
}
err = json.Unmarshal([]byte(req.GetProfile()), &profile)
err = yaml.Unmarshal([]byte(req.GetProfile()), &profile)
if err != nil {
return nil, fmt.Errorf("unable to unserialize the profile: %w", err)
}
@@ -192,7 +193,7 @@ func (grpc *GRPCServer) OBSOLETE_GitInfo(
ctx context.Context,
req *streamd_grpc.OBSOLETE_GetGitInfoRequest,
) (*streamd_grpc.OBSOLETE_GetGitInfoReply, error) {
isEnabled, err := grpc.StreamD.IsGITInitialized(ctx)
isEnabled, err := grpc.StreamD.OBSOLETE_IsGITInitialized(ctx)
if err != nil {
return nil, fmt.Errorf("unable to get the git info: %w", err)
}
@@ -205,7 +206,7 @@ func (grpc *GRPCServer) OBSOLETE_GitRelogin(
ctx context.Context,
req *streamd_grpc.OBSOLETE_GitReloginRequest,
) (*streamd_grpc.OBSOLETE_GitReloginReply, error) {
err := grpc.StreamD.GitRelogin(ctx)
err := grpc.StreamD.OBSOLETE_GitRelogin(ctx)
if err != nil {
return nil, fmt.Errorf("unable to relogin: %w", err)
}

View File

@@ -1,19 +1,45 @@
package streampanel
package streamd
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"github.com/facebookincubator/go-belt/tool/logger"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol/obs"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol/twitch"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol/youtube"
"github.com/xaionaro-go/streamctl/pkg/streamd"
streamd "github.com/xaionaro-go/streamctl/pkg/streamd/types"
)
var ErrSkipBackend = errors.New("backend was skipped")
func (d *StreamD) EXPERIMENTAL_ReinitStreamControllers(ctx context.Context) error {
platNames := make([]streamcontrol.PlatformName, 0, len(d.Config.Backends))
for platName := range d.Config.Backends {
platNames = append(platNames, platName)
}
sort.Slice(platNames, func(i, j int) bool {
return platNames[i] < platNames[j]
})
for _, platName := range platNames {
var err error
switch strings.ToLower(string(platName)) {
case strings.ToLower(string(obs.ID)):
err = d.initOBSBackend(ctx)
case strings.ToLower(string(twitch.ID)):
err = d.initTwitchBackend(ctx)
case strings.ToLower(string(youtube.ID)):
err = d.initYouTubeBackend(ctx)
}
if err != nil && err != ErrSkipBackend {
return fmt.Errorf("unable to initialize '%s': %w", platName, err)
}
}
return nil
}
var ErrSkipBackend = streamd.ErrSkipBackend
func newOBS(
ctx context.Context,
@@ -201,51 +227,51 @@ func newYouTube(
return yt, nil
}
func (p *Panel) initOBSBackend(ctx context.Context) error {
func (d *StreamD) initOBSBackend(ctx context.Context) error {
obs, err := newOBS(
ctx,
p.StreamD.(*streamd.StreamD).Config.Backends[obs.ID],
p.inputOBSConnectInfo,
d.Config.Backends[obs.ID],
d.UI.InputOBSConnectInfo,
func(cfg *streamcontrol.AbstractPlatformConfig) error {
return p.savePlatformConfig(ctx, obs.ID, cfg)
return d.setPlatformConfig(ctx, obs.ID, cfg)
},
)
if err != nil {
return err
}
p.StreamD.(*streamd.StreamD).StreamControllers.OBS = obs
d.StreamControllers.OBS = obs
return nil
}
func (p *Panel) initTwitchBackend(ctx context.Context) error {
func (d *StreamD) initTwitchBackend(ctx context.Context) error {
twitch, err := newTwitch(
ctx,
p.StreamD.(*streamd.StreamD).Config.Backends[twitch.ID],
p.inputTwitchUserInfo,
d.Config.Backends[twitch.ID],
d.UI.InputTwitchUserInfo,
func(cfg *streamcontrol.AbstractPlatformConfig) error {
return p.savePlatformConfig(ctx, twitch.ID, cfg)
return d.setPlatformConfig(ctx, twitch.ID, cfg)
},
p.oauthHandlerTwitch)
d.UI.OAuthHandlerTwitch)
if err != nil {
return err
}
p.StreamD.(*streamd.StreamD).StreamControllers.Twitch = twitch
d.StreamControllers.Twitch = twitch
return nil
}
func (p *Panel) initYouTubeBackend(ctx context.Context) error {
func (d *StreamD) initYouTubeBackend(ctx context.Context) error {
youTube, err := newYouTube(
ctx,
p.StreamD.(*streamd.StreamD).Config.Backends[youtube.ID],
p.inputYouTubeUserInfo,
d.Config.Backends[youtube.ID],
d.UI.InputYouTubeUserInfo,
func(cfg *streamcontrol.AbstractPlatformConfig) error {
return p.savePlatformConfig(ctx, youtube.ID, cfg)
return d.setPlatformConfig(ctx, youtube.ID, cfg)
},
p.oauthHandlerYouTube,
d.UI.OAuthHandlerYouTube,
)
if err != nil {
return err
}
p.StreamD.(*streamd.StreamD).StreamControllers.YouTube = youTube
d.StreamControllers.YouTube = youTube
return nil
}

View File

@@ -70,6 +70,28 @@ func New(configPath string, ui ui.UI, b *belt.Belt) (*StreamD, error) {
return d, nil
}
func (d *StreamD) Run(ctx context.Context) error {
d.UI.SetStatus("Initializing remote GIT storage...")
err := d.FetchConfig(ctx)
if err != nil {
d.UI.DisplayError(fmt.Errorf("unable to initialize the GIT storage: %w", err))
}
d.UI.SetStatus("Initializing streaming backends...")
if err := d.EXPERIMENTAL_ReinitStreamControllers(ctx); err != nil {
return fmt.Errorf("unable to initialize stream controllers: %w", err)
}
d.UI.SetStatus("Pre-downloading user data from streaming backends...")
if err := d.InitCache(ctx); err != nil {
d.UI.DisplayError(fmt.Errorf("unable to initialize cache: %w", err))
}
d.UI.SetStatus("Initializing UI...")
return nil
}
func (d *StreamD) readCache(ctx context.Context) error {
logger.Tracef(ctx, "readCache")
defer logger.Tracef(ctx, "/readCache")
@@ -170,13 +192,13 @@ func (d *StreamD) InitCache(ctx context.Context) error {
return nil
}
func (d *StreamD) SetPlatformConfig(
func (d *StreamD) setPlatformConfig(
ctx context.Context,
platID streamcontrol.PlatformName,
platCfg *streamcontrol.AbstractPlatformConfig,
) error {
logger.Debugf(ctx, "SetPlatformConfig('%s', '%#+v')", platID, platCfg)
defer logger.Debugf(ctx, "endof SetPlatformConfig('%s', '%#+v')", platID, platCfg)
logger.Debugf(ctx, "setPlatformConfig('%s', '%#+v')", platID, platCfg)
defer logger.Debugf(ctx, "endof setPlatformConfig('%s', '%#+v')", platID, platCfg)
d.ConfigLock.Lock()
defer d.ConfigLock.Unlock()
d.Config.Backends[platID] = platCfg
@@ -329,7 +351,7 @@ func (d *StreamD) IsBackendEnabled(ctx context.Context, id streamcontrol.Platfor
}
}
func (d *StreamD) IsGITInitialized(ctx context.Context) (bool, error) {
func (d *StreamD) OBSOLETE_IsGITInitialized(ctx context.Context) (bool, error) {
return d.GitStorage != nil, nil
}
@@ -389,7 +411,10 @@ func (d *StreamD) EndStream(ctx context.Context, platID streamcontrol.PlatformNa
}
}
func (d *StreamD) GetBackendData(ctx context.Context, platID streamcontrol.PlatformName) (any, error) {
func (d *StreamD) GetBackendData(
ctx context.Context,
platID streamcontrol.PlatformName,
) (any, error) {
switch platID {
case obs.ID:
return api.BackendDataOBS{}, nil

View File

@@ -0,0 +1,5 @@
package streamd
import "errors"
var ErrSkipBackend = errors.New("backend was skipped")

View File

@@ -1,11 +1,34 @@
package ui
import "context"
import (
"context"
"github.com/xaionaro-go/streamctl/pkg/oauthhandler"
"github.com/xaionaro-go/streamctl/pkg/streamcontrol"
obs "github.com/xaionaro-go/streamctl/pkg/streamcontrol/obs/types"
twitch "github.com/xaionaro-go/streamctl/pkg/streamcontrol/twitch/types"
youtube "github.com/xaionaro-go/streamctl/pkg/streamcontrol/youtube/types"
)
type UI interface {
SetStatus(string)
DisplayError(error)
Restart(context.Context, string)
InputGitUserData(
ctx context.Context,
) (bool, string, []byte, error)
OAuthHandlerTwitch(ctx context.Context, arg oauthhandler.OAuthHandlerArgument) error
OAuthHandlerYouTube(ctx context.Context, arg oauthhandler.OAuthHandlerArgument) error
InputTwitchUserInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[twitch.PlatformSpecificConfig, twitch.StreamProfile],
) (bool, error)
InputYouTubeUserInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[youtube.PlatformSpecificConfig, youtube.StreamProfile],
) (bool, error)
InputOBSConnectInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[obs.PlatformSpecificConfig, obs.StreamProfile],
) (bool, error)
}

View File

@@ -68,6 +68,8 @@ type Panel struct {
configPath string
configCache *config.Config
setStatusFunc func(string)
}
func New(
@@ -80,6 +82,13 @@ func New(
}
}
func (p *Panel) SetStatus(msg string) {
if p.setStatusFunc == nil {
return
}
p.setStatusFunc(msg)
}
func (p *Panel) Loop(ctx context.Context) error {
if p.defaultContext != nil {
return fmt.Errorf("Loop was already used, and cannot be used the second time")
@@ -98,27 +107,18 @@ func (p *Panel) Loop(ctx context.Context) error {
loadingWindow := p.newLoadingWindow(ctx)
resizeWindow(loadingWindow, fyne.NewSize(600, 600))
loadingWindowText := widget.NewRichTextFromMarkdown("# Initializing remote GIT storage...")
loadingWindowText := widget.NewRichTextFromMarkdown("")
loadingWindowText.Wrapping = fyne.TextWrapWord
loadingWindow.SetContent(loadingWindowText)
if os.Getenv("STREAMPANEL_QUICKSTART") != "" {
go p.StreamD.FetchConfig(ctx)
} else {
p.StreamD.FetchConfig(ctx)
p.setStatusFunc = func(msg string) {
loadingWindowText.ParseMarkdown(fmt.Sprintf("# %s", msg))
}
loadingWindowText.ParseMarkdown("# Initializing streaming backends...")
if err := p.initStreamControllers(ctx); err != nil {
err = fmt.Errorf("unable to initialize stream controllers: %w", err)
p.DisplayError(err)
return
err := p.StreamD.Run(ctx)
if err != nil {
p.DisplayError(fmt.Errorf("unable to initialize the streaming controllers: %w", err))
os.Exit(1)
}
loadingWindowText.ParseMarkdown("# Pre-downloading user data from streaming backends...")
p.StreamD.InitCache(ctx)
loadingWindowText.ParseMarkdown("# Initializing UI...")
p.setStatusFunc = nil
p.initMainWindow(ctx)
if err := p.rearrangeProfiles(ctx); err != nil {
@@ -160,16 +160,6 @@ func (p *Panel) initStreamD(ctx context.Context) error {
return nil
}
func (p *Panel) savePlatformConfig(
ctx context.Context,
platID streamcontrol.PlatformName,
platCfg *streamcontrol.AbstractPlatformConfig,
) error {
logger.Debugf(ctx, "savePlatformConfig('%s', '%#+v')", platID, platCfg)
defer logger.Debugf(ctx, "endof savePlatformConfig('%s', '%#+v')", platID, platCfg)
return p.StreamD.SetPlatformConfig(ctx, platID, platCfg)
}
func removeNonDigits(input string) string {
var result []rune
for _, r := range input {
@@ -180,7 +170,7 @@ func removeNonDigits(input string) string {
return string(result)
}
func (p *Panel) inputOBSConnectInfo(
func (p *Panel) InputOBSConnectInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[obs.PlatformSpecificConfig, obs.StreamProfile],
) (bool, error) {
@@ -258,15 +248,15 @@ func (p *Panel) inputOBSConnectInfo(
return true, nil
}
func (p *Panel) oauthHandlerTwitch(ctx context.Context, arg oauthhandler.OAuthHandlerArgument) error {
logger.Infof(ctx, "oauthHandlerTwitch: %#+v", arg)
defer logger.Infof(ctx, "/oauthHandlerTwitch")
func (p *Panel) OAuthHandlerTwitch(ctx context.Context, arg oauthhandler.OAuthHandlerArgument) error {
logger.Infof(ctx, "OAuthHandlerTwitch: %#+v", arg)
defer logger.Infof(ctx, "/OAuthHandlerTwitch")
return p.oauthHandler(ctx, arg)
}
func (p *Panel) oauthHandlerYouTube(ctx context.Context, arg oauthhandler.OAuthHandlerArgument) error {
logger.Infof(ctx, "oauthHandlerYouTube: %#+v", arg)
defer logger.Infof(ctx, "/oauthHandlerYouTube")
func (p *Panel) OAuthHandlerYouTube(ctx context.Context, arg oauthhandler.OAuthHandlerArgument) error {
logger.Infof(ctx, "OAuthHandlerYouTube: %#+v", arg)
defer logger.Infof(ctx, "/OAuthHandlerYouTube")
return p.oauthHandler(ctx, arg)
}
@@ -340,7 +330,7 @@ func (p *Panel) openBrowser(authURL string) error {
var twitchAppsCreateLink, _ = url.Parse("https://dev.twitch.tv/console/apps/create")
func (p *Panel) inputTwitchUserInfo(
func (p *Panel) InputTwitchUserInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[twitch.PlatformSpecificConfig, twitch.StreamProfile],
) (bool, error) {
@@ -401,7 +391,7 @@ func (p *Panel) inputTwitchUserInfo(
var youtubeCredentialsCreateLink, _ = url.Parse("https://console.cloud.google.com/apis/credentials/oauthclient")
func (p *Panel) inputYouTubeUserInfo(
func (p *Panel) InputYouTubeUserInfo(
ctx context.Context,
cfg *streamcontrol.PlatformConfig[youtube.PlatformSpecificConfig, youtube.StreamProfile],
) (bool, error) {
@@ -456,36 +446,6 @@ func (p *Panel) inputYouTubeUserInfo(
return true, nil
}
func (p *Panel) initStreamControllers(ctx context.Context) error {
cfg, err := p.StreamD.GetConfig(ctx)
if err != nil {
return fmt.Errorf("unable to get config: %w", err)
}
platNames := make([]streamcontrol.PlatformName, 0, len(cfg.Backends))
for platName := range cfg.Backends {
platNames = append(platNames, platName)
}
sort.Slice(platNames, func(i, j int) bool {
return platNames[i] < platNames[j]
})
for _, platName := range platNames {
var err error
switch strings.ToLower(string(platName)) {
case strings.ToLower(string(obs.ID)):
err = p.initOBSBackend(ctx)
case strings.ToLower(string(twitch.ID)):
err = p.initTwitchBackend(ctx)
case strings.ToLower(string(youtube.ID)):
err = p.initYouTubeBackend(ctx)
}
if err != nil && err != ErrSkipBackend {
return fmt.Errorf("unable to initialize '%s': %w", platName, err)
}
}
return nil
}
func (p *Panel) profileCreateOrUpdate(ctx context.Context, profile Profile) error {
cfg, err := p.StreamD.GetConfig(ctx)
if err != nil {
@@ -756,7 +716,7 @@ func (p *Panel) openSettingsWindow(ctx context.Context) error {
backendEnabled[backendID] = isEnabled
}
gitIsEnabled, err := p.StreamD.IsGITInitialized(ctx)
gitIsEnabled, err := p.StreamD.OBSOLETE_IsGITInitialized(ctx)
if err != nil {
return fmt.Errorf("unable to get info if GIT is initialized: %w", err)
}
@@ -824,15 +784,17 @@ func (p *Panel) openSettingsWindow(ctx context.Context) error {
if cfg.Backends[obs.ID] == nil {
obs.InitConfig(cfg.Backends)
}
oldEnable := cfg.Backends[obs.ID].Enable
oldCfg := cfg.Backends[obs.ID].Config
cfg.Backends[obs.ID].Enable = nil
cfg.Backends[obs.ID].Config = obs.PlatformSpecificConfig{}
err := p.initOBSBackend(ctx)
if err != nil {
if err := p.StreamD.SetConfig(ctx, cfg); err != nil {
p.DisplayError(err)
return
}
if err := p.StreamD.EXPERIMENTAL_ReinitStreamControllers(ctx); err != nil {
p.DisplayError(err)
cfg.Backends[obs.ID].Enable = oldEnable
cfg.Backends[obs.ID].Config = oldCfg
return
}
}),
@@ -843,15 +805,17 @@ func (p *Panel) openSettingsWindow(ctx context.Context) error {
if cfg.Backends[twitch.ID] == nil {
twitch.InitConfig(cfg.Backends)
}
oldEnable := cfg.Backends[twitch.ID].Enable
oldCfg := cfg.Backends[twitch.ID].Config
cfg.Backends[twitch.ID].Enable = nil
cfg.Backends[twitch.ID].Config = twitch.PlatformSpecificConfig{}
err := p.initTwitchBackend(ctx)
if err != nil {
if err := p.StreamD.SetConfig(ctx, cfg); err != nil {
p.DisplayError(err)
return
}
if err := p.StreamD.EXPERIMENTAL_ReinitStreamControllers(ctx); err != nil {
p.DisplayError(err)
cfg.Backends[twitch.ID].Enable = oldEnable
cfg.Backends[twitch.ID].Config = oldCfg
return
}
}),
@@ -862,14 +826,16 @@ func (p *Panel) openSettingsWindow(ctx context.Context) error {
if cfg.Backends[youtube.ID] == nil {
youtube.InitConfig(cfg.Backends)
}
oldEnable := cfg.Backends[youtube.ID].Enable
oldCfg := cfg.Backends[youtube.ID].Config
cfg.Backends[youtube.ID].Enable = nil
cfg.Backends[youtube.ID].Config = youtube.PlatformSpecificConfig{}
err := p.initYouTubeBackend(ctx)
if err != nil {
if err := p.StreamD.SetConfig(ctx, cfg); err != nil {
p.DisplayError(err)
return
}
if err := p.StreamD.EXPERIMENTAL_ReinitStreamControllers(ctx); err != nil {
p.DisplayError(err)
cfg.Backends[youtube.ID].Enable = oldEnable
cfg.Backends[youtube.ID].Config = oldCfg
return
}
}),
@@ -890,7 +856,7 @@ func (p *Panel) openSettingsWindow(ctx context.Context) error {
widget.NewRichTextFromMarkdown(`# Syncing (via git)`),
container.NewHBox(
widget.NewButtonWithIcon("(Re-)login in GIT", theme.LoginIcon(), func() {
err := p.StreamD.GitRelogin(ctx)
err := p.StreamD.OBSOLETE_GitRelogin(ctx)
if err != nil {
p.DisplayError(err)
}
@@ -908,10 +874,6 @@ func (p *Panel) openSettingsWindow(ctx context.Context) error {
w.Show()
if err := p.StreamD.SetConfig(ctx, cfg); err != nil {
return fmt.Errorf("unable to set the config: %w", err)
}
return nil
}