Documentation
¶
Index ¶
- type E2BOptions
- type E2BSandboxEnvironment
- func (e *E2BSandboxEnvironment) Capabilities() environment.Capabilities
- func (e *E2BSandboxEnvironment) Create(ctx context.Context, config environment.SessionConfig) error
- func (e *E2BSandboxEnvironment) CreateSnapshot(context.Context, string) (*environment.SnapshotInfo, error)
- func (e *E2BSandboxEnvironment) Destroy(ctx context.Context) error
- func (e *E2BSandboxEnvironment) ExecuteTool(ctx context.Context, req environment.ToolRequest, ...) (*environment.ToolResponse, error)
- func (e *E2BSandboxEnvironment) Pause(ctx context.Context) error
- func (e *E2BSandboxEnvironment) Resume(ctx context.Context) error
- func (e *E2BSandboxEnvironment) Rollback(context.Context, string) error
- func (e *E2BSandboxEnvironment) State() environment.SessionState
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type E2BOptions ¶
E2BOptions carries E2B-specific session create parameters.
type E2BSandboxEnvironment ¶
type E2BSandboxEnvironment struct {
// contains filtered or unexported fields
}
E2BSandboxEnvironment implements environment.ExecutionEnvironment using E2B REST APIs.
func NewE2BSandboxEnvironment ¶
func NewE2BSandboxEnvironment(apiKey string, opts ...Option) *E2BSandboxEnvironment
func (*E2BSandboxEnvironment) Capabilities ¶
func (e *E2BSandboxEnvironment) Capabilities() environment.Capabilities
func (*E2BSandboxEnvironment) Create ¶
func (e *E2BSandboxEnvironment) Create(ctx context.Context, config environment.SessionConfig) error
func (*E2BSandboxEnvironment) CreateSnapshot ¶
func (e *E2BSandboxEnvironment) CreateSnapshot(context.Context, string) (*environment.SnapshotInfo, error)
func (*E2BSandboxEnvironment) Destroy ¶
func (e *E2BSandboxEnvironment) Destroy(ctx context.Context) error
func (*E2BSandboxEnvironment) ExecuteTool ¶
func (e *E2BSandboxEnvironment) ExecuteTool(ctx context.Context, req environment.ToolRequest, onProgress func(environment.ToolProgress)) (*environment.ToolResponse, error)
func (*E2BSandboxEnvironment) Pause ¶
func (e *E2BSandboxEnvironment) Pause(ctx context.Context) error
func (*E2BSandboxEnvironment) Resume ¶
func (e *E2BSandboxEnvironment) Resume(ctx context.Context) error
func (*E2BSandboxEnvironment) Rollback ¶
func (e *E2BSandboxEnvironment) Rollback(context.Context, string) error
func (*E2BSandboxEnvironment) State ¶
func (e *E2BSandboxEnvironment) State() environment.SessionState
type Option ¶
type Option func(*E2BSandboxEnvironment)
func WithBaseURL ¶
func WithHTTPClient ¶
func WithLogger ¶
Click to show internal directories.
Click to hide internal directories.