client

package
v0.0.0-...-35aaca6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigestFromBlob

func DigestFromBlob(blob []byte, hasher Hasher) bfpb.Digest

func DigestFromMessage

func DigestFromMessage(msg proto.Message, hasher Hasher) (bfpb.Digest, error)

func DigestString

func DigestString(d bfpb.Digest) string

func DocumentSetContent

func DocumentSetContent(n *html.Node, c *html.Node)

func DocumentSetText

func DocumentSetText(n *html.Node, t string)

func Expect

func Expect(c *grpc.ClientConn, d bfpb.Digest, m proto.Message) error

func FetchTree

func FetchTree(d bfpb.Digest, i map[string]*reapi.Directory, c *grpc.ClientConn) error

func FromDigest

func FromDigest(d bfpb.Digest) reapi.Digest

func Hash

func Hash(key string) string

func Hide

func Hide(n *html.Node)

func Key

func Key(key string) string

func ParseDigest

func ParseDigest(s string) bfpb.Digest

func RegisterHash

func RegisterHash(h Hasher, f func() hash.Hash)

func RequestMetadata

func RequestMetadata(o *longrunning.Operation) *reapi.RequestMetadata

func Select

func Select(n *html.Node, selector string) *html.Node

func SelectAll

func SelectAll(n *html.Node, selector string) []*html.Node

func Show

func Show(n *html.Node)

func Slot

func Slot(key string) int

Slot returns a consistent slot number between 0 and 16383 for any given string key.

Types

type App

type App struct {
	Instance         string
	RedisHost        string
	ReapiHost        string
	LastRedisLatency time.Duration
	LastReapiLatency time.Duration
	CA               string
	Done             bool
	Client           *UnifiedRedis
	Conn             *grpc.ClientConn

	Ops         map[string]*longrunning.Operation
	Metadatas   map[string]*reapi.RequestMetadata
	Invocations map[string][]string
	Fetches     uint
	Mutex       *sync.Mutex

	FrameLimit      int
	SkipFrames      int
	UpdateCountdown int
	// contains filtered or unexported fields
}

func NewApp

func NewApp(redisHost string, reapiHost string, ca string) *App

func (*App) Connect

func (a *App) Connect()

func (*App) GetWorkerConn

func (a *App) GetWorkerConn(worker string, ca string) *grpc.ClientConn

type Document

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

func NewDocument

func NewDocument() *Document

func (*Document) Find

func (d *Document) Find(selector string) *html.Node

func (*Document) FindAll

func (d *Document) FindAll(selector string) []*html.Node

func (*Document) Parse

func (d *Document) Parse(data string)

func (*Document) Render

func (d *Document) Render() string

func (*Document) RenderSource

func (d *Document) RenderSource() string

func (*Document) SetRoot

func (d *Document) SetRoot(n *html.Node)

func (Document) Title

func (d Document) Title() string

func (*Document) Update

func (d *Document) Update()

type Hasher

type Hasher uint
const (
	MD5 Hasher = 1 + iota
	SHA1
	SHA256
	SHA384
	SHA512
	BLAKE3
)

func HasherFromDigestFunction

func HasherFromDigestFunction(df reapi.DigestFunction_Value) Hasher

func (Hasher) New

func (h Hasher) New() hash.Hash

type List

type List struct {
	ui.Block
	Rows        []fmt.Stringer
	WrapText    bool
	TextStyle   ui.Style
	SelectedRow int

	SelectedRowStyle ui.Style
	SubTitle         fmt.Stringer
	SubTitleStyle    ui.Style
	// contains filtered or unexported fields
}

func NewList

func NewList() *List

func (*List) Draw

func (self *List) Draw(buf *ui.Buffer)

func (*List) ScrollAmount

func (self *List) ScrollAmount(amount int)

ScrollAmount scrolls by amount given. If amount is < 0, then scroll up. There is no need to set self.topRow, as this will be set automatically when drawn, since if the selected item is off screen then the topRow variable will change accordingly.

func (*List) ScrollBottom

func (self *List) ScrollBottom()

func (*List) ScrollDown

func (self *List) ScrollDown()

func (*List) ScrollHalfPageDown

func (self *List) ScrollHalfPageDown()

func (*List) ScrollHalfPageUp

func (self *List) ScrollHalfPageUp()

func (*List) ScrollPageDown

func (self *List) ScrollPageDown()

func (*List) ScrollPageUp

func (self *List) ScrollPageUp()

func (*List) ScrollTop

func (self *List) ScrollTop()

func (*List) ScrollUp

func (self *List) ScrollUp()

type Operation

type Operation struct {
	Name     string
	Metadata *reapi.RequestMetadata
	Done     bool
}

func ParsePrequeueName

func ParsePrequeueName(json string) (*Operation, error)

func ParseQueueName

func ParseQueueName(json string) (*Operation, error)

type Paragraph

type Paragraph struct {
	ui.Block
	Text      string
	TextStyle ui.Style
	WrapText  bool
	Raw       bool
}

func NewParagraph

func NewParagraph() *Paragraph

func (*Paragraph) Draw

func (self *Paragraph) Draw(buf *ui.Buffer)

type Queue

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

func NewQueue

func NewQueue(ctx context.Context, c *UnifiedRedis, name string) *Queue

func (*Queue) Length

func (q *Queue) Length(ctx context.Context, c *UnifiedRedis) (int64, error)

func (*Queue) Slice

func (q *Queue) Slice(ctx context.Context, c *UnifiedRedis, start int64, stop int64, cb func(string) (*Operation, error)) []*Operation

type Tree

type Tree struct {
	ui.Block
	TextStyle        ui.Style
	SelectedRowStyle ui.Style
	WrapText         bool
	SelectedRow      int
	Focused          bool
	// contains filtered or unexported fields
}

Tree is a tree widget.

func NewTree

func NewTree() *Tree

NewTree creates a new Tree widget.

func (*Tree) Collapse

func (self *Tree) Collapse()

func (*Tree) CollapseAll

func (self *Tree) CollapseAll()

func (*Tree) Draw

func (self *Tree) Draw(buf *ui.Buffer)

func (*Tree) Expand

func (self *Tree) Expand()

func (*Tree) ExpandAll

func (self *Tree) ExpandAll()

func (*Tree) ScrollAmount

func (self *Tree) ScrollAmount(amount int)

ScrollAmount scrolls by amount given. If amount is < 0, then scroll up. There is no need to set self.topRow, as this will be set automatically when drawn, since if the selected item is off screen then the topRow variable will change accordingly.

func (*Tree) ScrollBottom

func (self *Tree) ScrollBottom()

func (*Tree) ScrollDown

func (self *Tree) ScrollDown()

func (*Tree) ScrollHalfPageDown

func (self *Tree) ScrollHalfPageDown()

func (*Tree) ScrollHalfPageUp

func (self *Tree) ScrollHalfPageUp()

func (*Tree) ScrollPageDown

func (self *Tree) ScrollPageDown()

func (*Tree) ScrollPageUp

func (self *Tree) ScrollPageUp()

func (*Tree) ScrollTop

func (self *Tree) ScrollTop()

func (*Tree) ScrollUp

func (self *Tree) ScrollUp()

func (*Tree) SelectedNode

func (self *Tree) SelectedNode() *TreeNode

func (*Tree) SetNodes

func (self *Tree) SetNodes(nodes []*TreeNode)

func (*Tree) Size

func (self *Tree) Size() int

func (*Tree) ToggleExpand

func (self *Tree) ToggleExpand()

func (*Tree) Walk

func (self *Tree) Walk(fn TreeWalkFn)

type TreeNode

type TreeNode struct {
	Value    fmt.Stringer
	Expanded bool
	Nodes    []*TreeNode
	// contains filtered or unexported fields
}

TreeNode is a tree node.

type TreeWalkFn

type TreeWalkFn func(*TreeNode) int

TreeWalkFn is a function used for walking a Tree. To interrupt the walking process function should return <= 0 To prevent steps down the tree, return <= 0

type UnifiedRedis

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

func (*UnifiedRedis) ClusterShards

func (r *UnifiedRedis) ClusterShards(ctx context.Context) *redis.ClusterShardsCmd

func (*UnifiedRedis) HLen

func (r *UnifiedRedis) HLen(ctx context.Context, key string) *redis.IntCmd

func (*UnifiedRedis) HScan

func (r *UnifiedRedis) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*UnifiedRedis) LLen

func (r *UnifiedRedis) LLen(ctx context.Context, key string) *redis.IntCmd

func (*UnifiedRedis) LRange

func (r *UnifiedRedis) LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*UnifiedRedis) ZCard

func (r *UnifiedRedis) ZCard(ctx context.Context, key string) *redis.IntCmd

func (*UnifiedRedis) ZRange

func (r *UnifiedRedis) ZRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

Jump to

Keyboard shortcuts

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