agent

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: GPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agent is for interacting with p2p server and clients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server connects to a Coder deployment and listens for p2p connections.

func NewServer

func NewServer(args ServerArgs) (*Server, error)

NewServer creates a new agent server.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run will listen and proxy new peer connections on a retry loop.

type ServerArgs

type ServerArgs struct {
	Log      slog.Logger
	CoderURL *url.URL
	Token    string
}

ServerArgs are the required arguments to create an agent server.

Jump to

Keyboard shortcuts

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