utils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindInPaths

func FindInPaths(paths openapi3.Paths, reqUrl string) (*openapi3.PathItem, map[string]string)

func GetTimeFromDuration

func GetTimeFromDuration(fromDuration string, inteval int64, tailMode bool) time.Time

func ParseDuration

func ParseDuration(duration string) (time.Duration, error)

Types

type BufCanBeNotified

type BufCanBeNotified interface {
	Subscribe(c chan bool)
}

标识该buf在有数据写入时会通知下游,下游传入一个chan bool,当有数据时就会通知

type BufWithNotify

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

func (*BufWithNotify) Read

func (b *BufWithNotify) Read(p []byte) (n int, err error)

func (*BufWithNotify) Subscribe

func (b *BufWithNotify) Subscribe(c chan bool)

func (*BufWithNotify) Write

func (b *BufWithNotify) Write(p []byte) (n int, err error)

type ZipReadCloser

type ZipReadCloser struct {
	Zip io.ReadCloser
	Low io.ReadCloser
}

func (*ZipReadCloser) Close

func (z *ZipReadCloser) Close() error

func (*ZipReadCloser) Read

func (z *ZipReadCloser) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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