Skip to content

Commit

Permalink
move vdomclient to waveapp
Browse files Browse the repository at this point in the history
  • Loading branch information
sawka committed Nov 14, 2024
1 parent 2dfdf66 commit cfb303d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

package vdomclient
package waveapp

import (
"bytes"
Expand Down
6 changes: 3 additions & 3 deletions pkg/vdom/vdomclient/vdomclient.go → pkg/waveapp/waveapp.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

package vdomclient
package waveapp

import (
"context"
Expand Down Expand Up @@ -44,7 +44,7 @@ type Client struct {
RootElem *vdom.VDomElem
RpcClient *wshutil.WshRpc
RpcContext *wshrpc.RpcContext
ServerImpl *VDomServerImpl
ServerImpl *WaveAppServerImpl
IsDone bool
RouteId string
VDomContextBlockId string
Expand Down Expand Up @@ -171,7 +171,7 @@ func (client *Client) Connect() error {
if client.RpcContext == nil || client.RpcContext.BlockId == "" {
return fmt.Errorf("no block id in rpc context")
}
client.ServerImpl = &VDomServerImpl{BlockId: client.RpcContext.BlockId, Client: client}
client.ServerImpl = &WaveAppServerImpl{BlockId: client.RpcContext.BlockId, Client: client}
sockName, err := wshutil.ExtractUnverifiedSocketName(jwtToken)
if err != nil {
return fmt.Errorf("error extracting socket name from %s: %v", wshutil.WaveJwtTokenVarName, err)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

package vdomclient
package waveapp

import (
"bytes"
Expand All @@ -14,14 +14,14 @@ import (
"github.com/wavetermdev/waveterm/pkg/wshrpc"
)

type VDomServerImpl struct {
type WaveAppServerImpl struct {
Client *Client
BlockId string
}

func (*VDomServerImpl) WshServerImpl() {}
func (*WaveAppServerImpl) WshServerImpl() {}

func (impl *VDomServerImpl) VDomRenderCommand(ctx context.Context, feUpdate vdom.VDomFrontendUpdate) chan wshrpc.RespOrErrorUnion[*vdom.VDomBackendUpdate] {
func (impl *WaveAppServerImpl) VDomRenderCommand(ctx context.Context, feUpdate vdom.VDomFrontendUpdate) chan wshrpc.RespOrErrorUnion[*vdom.VDomBackendUpdate] {
respChan := make(chan wshrpc.RespOrErrorUnion[*vdom.VDomBackendUpdate], 5)

defer func() {
Expand Down Expand Up @@ -99,7 +99,7 @@ func (impl *VDomServerImpl) VDomRenderCommand(ctx context.Context, feUpdate vdom
return respChan
}

func (impl *VDomServerImpl) VDomUrlRequestCommand(ctx context.Context, data wshrpc.VDomUrlRequestData) chan wshrpc.RespOrErrorUnion[wshrpc.VDomUrlRequestResponse] {
func (impl *WaveAppServerImpl) VDomUrlRequestCommand(ctx context.Context, data wshrpc.VDomUrlRequestData) chan wshrpc.RespOrErrorUnion[wshrpc.VDomUrlRequestResponse] {
respChan := make(chan wshrpc.RespOrErrorUnion[wshrpc.VDomUrlRequestResponse])
writer := NewStreamingResponseWriter(respChan)

Expand Down

0 comments on commit cfb303d

Please sign in to comment.