agent

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Copyright © 2023 Harry C <hoveychen@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentServer

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

Agent server is responsible for: 1. Maintain connections to hub 2. Forward hub's request to the right upstream

func NewAgentServer

func NewAgentServer(hubAddr, upstreamAddr, token string, opts ...AgentServerOption) (*AgentServer, error)

func (*AgentServer) Run

func (as *AgentServer) Run(ctx context.Context) error

type AgentServerOption

type AgentServerOption func(as *AgentServer)

func WithAgentID added in v1.1.16

func WithAgentID(agentID int) AgentServerOption

func WithNumWorker

func WithNumWorker(num int) AgentServerOption

func WithReportHardware added in v1.1.0

func WithReportHardware(report bool) AgentServerOption

Jump to

Keyboard shortcuts

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