operator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0, 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 APIInfo

type APIInfo struct {
	Addr  string
	Token []byte
}

func ParseApiInfo

func ParseApiInfo(s string) APIInfo

func (APIInfo) AuthHeader

func (a APIInfo) AuthHeader() http.Header

func (APIInfo) DialArgs

func (a APIInfo) DialArgs(version string) (string, error)

func (APIInfo) Host

func (a APIInfo) Host() (string, error)

type Operator

type Operator interface {
	Version(context.Context) (string, error)           //perm:read
	LogList(context.Context) ([]string, error)         //perm:write
	LogSetLevel(context.Context, string, string) error //perm:write
}

func NewOperatorClient

func NewOperatorClient(ctx context.Context, addr string, requestHeader http.Header) (Operator, jsonrpc.ClientCloser, error)

type OperatorImpl

type OperatorImpl struct {
}

func (*OperatorImpl) LogList

func (s *OperatorImpl) LogList(ctx context.Context) ([]string, error)

func (*OperatorImpl) LogSetLevel

func (s *OperatorImpl) LogSetLevel(ctx context.Context, subsystem string, level string) error

func (*OperatorImpl) Version

func (s *OperatorImpl) Version(ctx context.Context) (string, error)

type OperatorStruct

type OperatorStruct struct {
	Internal struct {
		Version     func(p0 context.Context) (string, error)             `perm:"read"`
		LogList     func(p0 context.Context) ([]string, error)           `perm:"write"`
		LogSetLevel func(p0 context.Context, p1 string, p2 string) error `perm:"write"`
	}
}

func (*OperatorStruct) LogList

func (s *OperatorStruct) LogList(p0 context.Context) ([]string, error)

func (*OperatorStruct) LogSetLevel

func (s *OperatorStruct) LogSetLevel(p0 context.Context, p1 string, p2 string) error

func (*OperatorStruct) Version

func (s *OperatorStruct) Version(p0 context.Context) (string, error)

Jump to

Keyboard shortcuts

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