server

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalServer

type LocalServer struct {
	// contains filtered or unexported fields
}

LocalServer runs a gluon server in the same process as the benchmark process.

func (*LocalServer) Address

func (l *LocalServer) Address() net.Addr

func (*LocalServer) Close

func (l *LocalServer) Close(ctx context.Context) error

type LocalServerBuilder

type LocalServerBuilder struct{}

func (*LocalServerBuilder) New

func (*LocalServerBuilder) New(ctx context.Context, serverPath string, profiler profiling.CmdProfilerBuilder) (Server, error)

type RemoteServer

type RemoteServer struct {
	// contains filtered or unexported fields
}

RemoteServer can't control the start or stopping of the server but can still be used to run the benchmarks against an existing server.

func (*RemoteServer) Address

func (r *RemoteServer) Address() net.Addr

func (*RemoteServer) Close

func (*RemoteServer) Close(ctx context.Context) error

type RemoteServerBuilder

type RemoteServerBuilder struct {
	// contains filtered or unexported fields
}

func NewRemoteServerBuilder

func NewRemoteServerBuilder(address string) (*RemoteServerBuilder, error)

func (*RemoteServerBuilder) New

func (r *RemoteServerBuilder) New(ctx context.Context, serverPath string, profiler profiling.CmdProfilerBuilder) (Server, error)

type Server

type Server interface {
	// Close should close all server connections or shut down the server.
	Close(ctx context.Context) error

	// Address should return the server address.
	Address() net.Addr
}

type ServerBuilder

type ServerBuilder interface {
	// New Create new Server instance at a given path and use the command profiler, if possible.
	New(ctx context.Context, serverPath string, profiler profiling.CmdProfilerBuilder) (Server, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL