io

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 0 Imported by: 4

Documentation

Overview

Package io defined io supportive interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	//Encode encodes a stream
	Encode(stream Stream)
}

Encoder defines stream encoder

type Flusher

type Flusher interface {
	//Flush flush data stream if needed
	Flush() error
}

Flusher represents flusher

type Stream

type Stream interface {
	//Put puts  bytes
	Put(bs []byte)
	//Put puts a byte
	PutByte(b byte)
	//PutObject put stream encoded objects
	PutObject(key string, object Encoder)
	//PutObjects put objects
	PutObjects(key string, objects []Encoder)
	//Put puts string
	PutString(key, value string)
	//PutNonEmptyString puts non empty string
	PutNonEmptyString(key, value string)
	//PutB64EncodedBytes puts base64 encoded byte
	PutB64EncodedBytes(key string, bytes []byte)
	//PutStrings puts string slice
	PutStrings(key string, values []string)
	//PutInts puts ints slice
	PutInts(key string, values []int)
	//PutUInts puts uint slice
	PutUInts(key string, values []uint64)
	//PutInt puts int
	PutInt(key string, value int)
	//PutFloat puts float
	PutFloat(key string, value float64)
	//PutFloat64s puts uint slice
	PutFloats(key string, values []float64)
	//PutBool puts bool
	PutBool(key string, value bool)
	//PutBools puts bool
	PutBools(key string, value []bool)
}

Stream represents a message stream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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