agent

package
v0.0.0-...-f7536bd Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AgentKey = "yogo:agent"

Variables

This section is empty.

Functions

func NewService

func NewService(params ...interface{}) (interface{}, error)

初始化实例的方法

Types

type Agent

type Agent struct {
	Ip      string // 本机ip
	Port    string // 本机端口
	HostUrl string // 主机地址
	Status  bool   // 状态
}

type AgentProvider

type AgentProvider struct {
	framework.ServiceProvider
	// contains filtered or unexported fields
}

func (*AgentProvider) Boot

func (sp *AgentProvider) Boot(c framework.Container) error

func (*AgentProvider) IsDefer

func (sp *AgentProvider) IsDefer() bool

func (*AgentProvider) Name

func (sp *AgentProvider) Name() string

func (*AgentProvider) Params

func (sp *AgentProvider) Params(c framework.Container) []interface{}

func (*AgentProvider) Register

type IService

type IService interface {
	Register() error // 注册agent为本机服务
	Status() error   // 查询agent服务状态
	RunScript(script []byte, writer io.Writer) error
	ListScript() ([]string, error)
	DetailScript(name string) ([]byte, error)
	Tail(path string, writer io.Writer) error
}

type Service

type Service struct {
	IService
	// contains filtered or unexported fields
}

func (*Service) DetailScript

func (s *Service) DetailScript(name string) ([]byte, error)

func (*Service) ListScript

func (s *Service) ListScript() ([]string, error)

func (*Service) Register

func (s *Service) Register() error

func (*Service) RunScript

func (s *Service) RunScript(script []byte, writer io.Writer) error

func (*Service) Status

func (s *Service) Status() error

Jump to

Keyboard shortcuts

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