Skip to content

Multiple context managed by a load balancing technique #410

@anzalabidi

Description

@anzalabidi
iso := v8.NewIsolate()
	defer iso.Dispose()
	if iso == nil {
		log.Fatal("Failed to create V8 isolate")
	}
	v8Ctx := v8.NewContext(iso)
	defer v8Ctx.Close()

	_, err = v8Ctx.RunScript(backendBundle, "bundle.js")
	if err != nil {
		log.Fatalf("Failed to evaluate bundled script: %v", err)
	}
	val, err := v8Ctx.RunScript(fmt.Sprintf("renderApp(%s)", string(propsJSON)), "render.js")
	if err != nil {
		log.Fatalf("Failed to render React component: %v", err)
	}

Need to make this usable via context pool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions