base

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

README

base

base contains optimised generated code for kitex generic. base is used widely in internal systems, so we expect to have a unified place for base. It deprecates Base and BaseResp structs in kitex and dynamicgo

Users should not use this package, it's only for cloudwego internals.

The code under this package is generated by fastgo version of thriftgo which we haven't released yet and is only used in a few repos. You can find the code here.

Use thriftgo fastgo at your own risks. it's NOT fully tested and that's why we manually add test code in this package.

Documentation

Overview

Code generated by thriftgo (0.3.15) (fastgo). DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	LogID      string            `thrift:"LogID,1" json:"LogID"`
	Caller     string            `thrift:"Caller,2" json:"Caller"`
	Addr       string            `thrift:"Addr,3" json:"Addr"`
	Client     string            `thrift:"Client,4" json:"Client"`
	TrafficEnv *TrafficEnv       `thrift:"TrafficEnv,5,optional" json:"TrafficEnv,omitempty"`
	Extra      map[string]string `thrift:"Extra,6,optional" json:"Extra,omitempty"`
}

func NewBase

func NewBase() *Base

func (*Base) BLength

func (p *Base) BLength() int

func (*Base) FastRead

func (p *Base) FastRead(b []byte) (off int, err error)

func (*Base) FastWrite

func (p *Base) FastWrite(b []byte) int

func (*Base) FastWriteNocopy

func (p *Base) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int

func (*Base) InitDefault

func (p *Base) InitDefault()

func (*Base) String

func (p *Base) String() string

type BaseResp

type BaseResp struct {
	StatusMessage string            `thrift:"StatusMessage,1" json:"StatusMessage"`
	StatusCode    int32             `thrift:"StatusCode,2" json:"StatusCode"`
	Extra         map[string]string `thrift:"Extra,3,optional" json:"Extra,omitempty"`
}

func NewBaseResp

func NewBaseResp() *BaseResp

func (*BaseResp) BLength

func (p *BaseResp) BLength() int

func (*BaseResp) FastRead

func (p *BaseResp) FastRead(b []byte) (off int, err error)

func (*BaseResp) FastWrite

func (p *BaseResp) FastWrite(b []byte) int

func (*BaseResp) FastWriteNocopy

func (p *BaseResp) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int

func (*BaseResp) InitDefault

func (p *BaseResp) InitDefault()

func (*BaseResp) String

func (p *BaseResp) String() string

type TrafficEnv

type TrafficEnv struct {
	Open bool   `thrift:"Open,1" json:"Open"`
	Env  string `thrift:"Env,2" json:"Env"`
}

func NewTrafficEnv

func NewTrafficEnv() *TrafficEnv

func (*TrafficEnv) BLength

func (p *TrafficEnv) BLength() int

func (*TrafficEnv) FastRead

func (p *TrafficEnv) FastRead(b []byte) (off int, err error)

func (*TrafficEnv) FastWrite

func (p *TrafficEnv) FastWrite(b []byte) int

func (*TrafficEnv) FastWriteNocopy

func (p *TrafficEnv) FastWriteNocopy(b []byte, w thrift.NocopyWriter) int

func (*TrafficEnv) InitDefault

func (p *TrafficEnv) InitDefault()

func (*TrafficEnv) String

func (p *TrafficEnv) String() string

Jump to

Keyboard shortcuts

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