api

package
v0.0.0-...-164995d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtTranLogNumPos  = "^((?i)alter)(\\s+)((?i)" + EXTRACT + ")(\\s+)((?:[A-Za-z0-9_]){1,12})(\\s+)((?i)" + TRANLOG + ")(\\s+)((?i)" + LOGNUM + ")(\\s+)(\\d+)(\\s+)((?i)" + LOGPOS + ")(\\s+)(\\d+)$"
	ExtTrailLogSeqRBA = "^((?i)alter)(\\s+)((?i)" + EXTRACT + ")(\\s+)((?:[A-Za-z0-9_]){1,12})(\\s+)((?i)" + TRAILLOG + ")(\\s+)((?i)" + EXTSEQNO + ")(\\s+)(\\d+)(\\s+)((?i)" + EXTRBA + ")(\\s+)(\\d+)$"
	ExtTranLogSCN     = "^((?i)alter)(\\s+)((?i)" + EXTRACT + ")(\\s+)((?:[A-Za-z0-9_]){1,12})(\\s+)((?i)" + SCN + ")(\\s+)(\\d+)$"
)
View Source
const (
	PluginsDir    = "lib"
	CmdSymbolName = "Commands"    // 用来从插件中获取指针的type名称
	CmdSymbolType = "LibType"     // 用来从插件中获取指针的type名称
	DefaultPrompt = "CLI>"        // 默认命令提示符
	ShellPrompt   = "ShellPrompt" // 命令提示符Key
	ShellStdout   = "ShellStdout" // Stdout map的key
	ShellStderr   = "ShellStderr" // Stderr map的key
	ShellStdin    = "ShellStdin"  // Stdin map的key
	ShellCommand  = "ShellCommand"
	RpcSubject    = "RPCSUBJECT"
	LogWrite      = "LOGWRITE"
)
View Source
const (
	HELP   = "HELP"
	EXIT   = "EXIT"
	PROMPT = "PROMPT"
	SYS    = "SYS"
	HO     = "HO"
)

系统命令

View Source
const (
	PARAMS   = "PARAMS"
	EXTRACT  = "EXTRACT"
	REPLICAT = "REPLICAT"
	TRANSMIT = "TRANSMIT"
	UNIFIED  = "UNIFIED"
)

extract命令

View Source
const (
	EXTSEQNO = "extseqno"
	EXTRBA   = "extrba"
	LOGNUM   = "lognum"
	LOGPOS   = "logpos"
	TRAILLOG = "traillog" // 值切勿改变其大小写
	TRANLOG  = "tranlog"  // 值切勿改变其大小写
	SCN      = "scn"      // 值切勿改变其大小写
)
View Source
const (
	ALL = "ALL"
)

extract命令

Variables

This section is empty.

Functions

func AttrParse

func AttrParse(args []string, pi *ddsutils.ProcessInfo) (interface{}, error)

func GetHomeDir

func GetHomeDir() (homeDir string)

根据执行文件路径获取程序的HOME路径

func GetPrompt

func GetPrompt(ctx context.Context) string

func GetStdout

func GetStdout(ctx context.Context) io.Writer

func SetPrompt

func SetPrompt(prompt ...string) string

func SliceToString

func SliceToString(kv []string) *string

切片转为字符类型

Types

type Command

type Command interface {
	Name() string
	Usage() string
	ShortDesc() string
	LongDesc() string
	Exec(context.Context, []string, chan os.Signal) (context.Context, error)
}

Command represents an executable a command

type Commands

type Commands interface {
	Module
	Registry() map[string]map[string]Command
}

Commands a plugin that contains one or more command

type LSNAttributes

type LSNAttributes struct {
	ProcessName string
	// contains filtered or unexported fields
}

func (*LSNAttributes) GetLSN

func (m *LSNAttributes) GetLSN() (uint64, uint64)

type LibSys

type LibSys struct {
	Type    string
	Command string
}

type Module

type Module interface {
	Init(context.Context) error
}

Module a plugin that can be initialized

type ProcessGroupInfo

type ProcessGroupInfo struct {
	GroupId     string
	DBType      string
	ProcessType string
}

func NewGroupFile

func NewGroupFile() *ProcessGroupInfo

func (*ProcessGroupInfo) InsertGroupInfo

func (p *ProcessGroupInfo) InsertGroupInfo(groupName string, dbType string, proType string) error

func (*ProcessGroupInfo) ReadGroupFileInfo

func (p *ProcessGroupInfo) ReadGroupFileInfo(g string) (*ProcessGroupInfo, error)

func (*ProcessGroupInfo) Remove

func (p *ProcessGroupInfo) Remove() error

func (*ProcessGroupInfo) WriteTo

func (p *ProcessGroupInfo) WriteTo() error

type TrailAttrBody

type TrailAttrBody struct {
	ProcessName string
	// contains filtered or unexported fields
}

func (*TrailAttrBody) GetTSN

func (t *TrailAttrBody) GetTSN() (uint64, uint64)

Jump to

Keyboard shortcuts

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