configf

package
v1.4.41 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/ConfigF.ksf Package configf comment

Code generated by ksf2go 1.3.22, DO NOT EDIT. This file was generated from /home/cc/workspace/KsfGo/ksf/protocol/res/ConfigF.ksf Package configf comment

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config struct

func NewConfig added in v1.4.38

func NewConfig() *Config

NewConfig creates a new Config servant.

func (*Config) AllEndpoints added in v1.4.39

func (obj *Config) AllEndpoints() (active []*endpoint.Endpoint, inactive []*endpoint.Endpoint)

Endpoints returns all endpoint.Endpoint

func (*Config) CheckConfig

func (obj *Config) CheckConfig(appServerName string, filename string, host string, result *string, opts ...map[string]string) (int32, error)

CheckConfig is the proxy function for the method defined in the ksf file, with the context

func (*Config) CheckConfigByInfo

func (obj *Config) CheckConfigByInfo(configInfo *ConfigInfo, result *string, opts ...map[string]string) (int32, error)

CheckConfigByInfo is the proxy function for the method defined in the ksf file, with the context

func (*Config) CheckConfigByInfoOneWayWithContext

func (obj *Config) CheckConfigByInfoOneWayWithContext(ksfCtx context.Context, configInfo *ConfigInfo, result *string, opts ...map[string]string) (ret int32, err error)

CheckConfigByInfoOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) CheckConfigByInfoWithContext

func (obj *Config) CheckConfigByInfoWithContext(ksfCtx context.Context, configInfo *ConfigInfo, result *string, opts ...map[string]string) (ret int32, err error)

CheckConfigByInfoWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) CheckConfigOneWayWithContext

func (obj *Config) CheckConfigOneWayWithContext(ksfCtx context.Context, appServerName string, filename string, host string, result *string, opts ...map[string]string) (ret int32, err error)

CheckConfigOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) CheckConfigWithContext

func (obj *Config) CheckConfigWithContext(ksfCtx context.Context, appServerName string, filename string, host string, result *string, opts ...map[string]string) (ret int32, err error)

CheckConfigWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) Dispatch

func (obj *Config) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ksfResp *requestf.ResponsePacket, withContext bool) (err error)

Dispatch is used to call the server side implement for the method defined in the ksf file. withContext shows using context or not.

func (*Config) Endpoints added in v1.4.38

func (obj *Config) Endpoints() (active []*endpoint.Endpoint)

Endpoints returns all active endpoint.Endpoint

func (*Config) GetServant added in v1.4.38

func (obj *Config) GetServant() (servant *model.Servant)

GetServant gets servant for the service.

func (*Config) KsfPing added in v1.4.38

func (obj *Config) KsfPing()

KsfPing

func (*Config) KsfPingWithContext added in v1.4.38

func (obj *Config) KsfPingWithContext(ksfCtx context.Context)

KsfPingWithContext

func (*Config) KsfSetProtocol

func (obj *Config) KsfSetProtocol(p model.Protocol)

KsfSetProtocol sets the protocol for the servant.

func (*Config) KsfSetTimeout

func (obj *Config) KsfSetTimeout(timeout int)

KsfSetTimeout sets the timeout for the servant which is in ms.

func (*Config) ListAllConfigByInfo

func (obj *Config) ListAllConfigByInfo(configInfo *GetConfigListInfo, vf *[]string, opts ...map[string]string) (int32, error)

ListAllConfigByInfo is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListAllConfigByInfoOneWayWithContext

func (obj *Config) ListAllConfigByInfoOneWayWithContext(ksfCtx context.Context, configInfo *GetConfigListInfo, vf *[]string, opts ...map[string]string) (ret int32, err error)

ListAllConfigByInfoOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListAllConfigByInfoWithContext

func (obj *Config) ListAllConfigByInfoWithContext(ksfCtx context.Context, configInfo *GetConfigListInfo, vf *[]string, opts ...map[string]string) (ret int32, err error)

ListAllConfigByInfoWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListConfig

func (obj *Config) ListConfig(app string, server string, vf *[]string, opts ...map[string]string) (int32, error)

ListConfig is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListConfigByInfo

func (obj *Config) ListConfigByInfo(configInfo *ConfigInfo, vf *[]string, opts ...map[string]string) (int32, error)

ListConfigByInfo is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListConfigByInfoOneWayWithContext

func (obj *Config) ListConfigByInfoOneWayWithContext(ksfCtx context.Context, configInfo *ConfigInfo, vf *[]string, opts ...map[string]string) (ret int32, err error)

ListConfigByInfoOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListConfigByInfoWithContext

func (obj *Config) ListConfigByInfoWithContext(ksfCtx context.Context, configInfo *ConfigInfo, vf *[]string, opts ...map[string]string) (ret int32, err error)

ListConfigByInfoWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListConfigOneWayWithContext

func (obj *Config) ListConfigOneWayWithContext(ksfCtx context.Context, app string, server string, vf *[]string, opts ...map[string]string) (ret int32, err error)

ListConfigOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) ListConfigWithContext

func (obj *Config) ListConfigWithContext(ksfCtx context.Context, app string, server string, vf *[]string, opts ...map[string]string) (ret int32, err error)

ListConfigWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfig

func (obj *Config) LoadConfig(app string, server string, filename string, config *string, opts ...map[string]string) (int32, error)

LoadConfig is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigByHost

func (obj *Config) LoadConfigByHost(appServerName string, filename string, host string, config *string, opts ...map[string]string) (int32, error)

LoadConfigByHost is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigByHostOneWayWithContext

func (obj *Config) LoadConfigByHostOneWayWithContext(ksfCtx context.Context, appServerName string, filename string, host string, config *string, opts ...map[string]string) (ret int32, err error)

LoadConfigByHostOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigByHostWithContext

func (obj *Config) LoadConfigByHostWithContext(ksfCtx context.Context, appServerName string, filename string, host string, config *string, opts ...map[string]string) (ret int32, err error)

LoadConfigByHostWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigByInfo

func (obj *Config) LoadConfigByInfo(configInfo *ConfigInfo, config *string, opts ...map[string]string) (int32, error)

LoadConfigByInfo is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigByInfoOneWayWithContext

func (obj *Config) LoadConfigByInfoOneWayWithContext(ksfCtx context.Context, configInfo *ConfigInfo, config *string, opts ...map[string]string) (ret int32, err error)

LoadConfigByInfoOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigByInfoWithContext

func (obj *Config) LoadConfigByInfoWithContext(ksfCtx context.Context, configInfo *ConfigInfo, config *string, opts ...map[string]string) (ret int32, err error)

LoadConfigByInfoWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigOneWayWithContext

func (obj *Config) LoadConfigOneWayWithContext(ksfCtx context.Context, app string, server string, filename string, config *string, opts ...map[string]string) (ret int32, err error)

LoadConfigOneWayWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) LoadConfigWithContext

func (obj *Config) LoadConfigWithContext(ksfCtx context.Context, app string, server string, filename string, config *string, opts ...map[string]string) (ret int32, err error)

LoadConfigWithContext is the proxy function for the method defined in the ksf file, with the context

func (*Config) SetOnCloseCallback added in v1.4.38

func (obj *Config) SetOnCloseCallback(callback func(string))

SetOnCloseCallback

func (*Config) SetOnConnectCallback added in v1.4.38

func (obj *Config) SetOnConnectCallback(callback func(string))

SetOnConnectCallback

func (*Config) SetPushCallback added in v1.4.38

func (obj *Config) SetPushCallback(callback func([]byte))

SetPushCallback

func (*Config) SetServant

func (obj *Config) SetServant(servant model.Servant)

SetServant sets servant for the service.

type ConfigInfo

type ConfigInfo struct {
	Appname     string `json:"appname" ksf:"appname,tag:0,require:true"`
	Servername  string `json:"servername" ksf:"servername,tag:1,require:true"`
	Filename    string `json:"filename" ksf:"filename,tag:2,require:true"`
	BAppOnly    bool   `json:"bAppOnly" ksf:"bAppOnly,tag:3,require:true"`
	Host        string `json:"host" ksf:"host,tag:4,require:false"`
	Setdivision string `json:"setdivision" ksf:"setdivision,tag:5,require:false"`
}

ConfigInfo struct implement

func (*ConfigInfo) ReadBlock

func (st *ConfigInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

ReadBlock reads struct from the given tag , require or optional.

func (*ConfigInfo) ReadFrom

func (st *ConfigInfo) ReadFrom(readBuf *codec.Reader) error

ReadFrom reads from readBuf and put into struct.

func (*ConfigInfo) ResetDefault

func (st *ConfigInfo) ResetDefault()

func (*ConfigInfo) WriteBlock

func (st *ConfigInfo) WriteBlock(buf *codec.Buffer, tag byte) error

WriteBlock encode struct

func (*ConfigInfo) WriteTo

func (st *ConfigInfo) WriteTo(buf *codec.Buffer) (err error)

WriteTo encode struct to buffer

type ConfigServant

type ConfigServant interface {
	ListConfig(app string, server string, vf *[]string) (ret int32, err error)
	LoadConfig(app string, server string, filename string, config *string) (ret int32, err error)
	LoadConfigByHost(appServerName string, filename string, host string, config *string) (ret int32, err error)
	CheckConfig(appServerName string, filename string, host string, result *string) (ret int32, err error)
	ListConfigByInfo(configInfo *ConfigInfo, vf *[]string) (ret int32, err error)
	LoadConfigByInfo(configInfo *ConfigInfo, config *string) (ret int32, err error)
	CheckConfigByInfo(configInfo *ConfigInfo, result *string) (ret int32, err error)
	ListAllConfigByInfo(configInfo *GetConfigListInfo, vf *[]string) (ret int32, err error)
}

type ConfigServantWithContext

type ConfigServantWithContext interface {
	ListConfig(ksfCtx context.Context, app string, server string, vf *[]string) (ret int32, err error)
	LoadConfig(ksfCtx context.Context, app string, server string, filename string, config *string) (ret int32, err error)
	LoadConfigByHost(ksfCtx context.Context, appServerName string, filename string, host string, config *string) (ret int32, err error)
	CheckConfig(ksfCtx context.Context, appServerName string, filename string, host string, result *string) (ret int32, err error)
	ListConfigByInfo(ksfCtx context.Context, configInfo *ConfigInfo, vf *[]string) (ret int32, err error)
	LoadConfigByInfo(ksfCtx context.Context, configInfo *ConfigInfo, config *string) (ret int32, err error)
	CheckConfigByInfo(ksfCtx context.Context, configInfo *ConfigInfo, result *string) (ret int32, err error)
	ListAllConfigByInfo(ksfCtx context.Context, configInfo *GetConfigListInfo, vf *[]string) (ret int32, err error)
	DoClose(ctx context.Context)
}

type GetConfigListInfo

type GetConfigListInfo struct {
	Appname       string `json:"appname" ksf:"appname,tag:0,require:true"`
	Servername    string `json:"servername" ksf:"servername,tag:1,require:false"`
	BAppOnly      bool   `json:"bAppOnly" ksf:"bAppOnly,tag:2,require:false"`
	Host          string `json:"host" ksf:"host,tag:3,require:false"`
	Setdivision   string `json:"setdivision" ksf:"setdivision,tag:4,require:false"`
	Containername string `json:"containername" ksf:"containername,tag:5,require:false"`
}

GetConfigListInfo struct implement

func (*GetConfigListInfo) ReadBlock

func (st *GetConfigListInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error

ReadBlock reads struct from the given tag , require or optional.

func (*GetConfigListInfo) ReadFrom

func (st *GetConfigListInfo) ReadFrom(readBuf *codec.Reader) error

ReadFrom reads from readBuf and put into struct.

func (*GetConfigListInfo) ResetDefault

func (st *GetConfigListInfo) ResetDefault()

func (*GetConfigListInfo) WriteBlock

func (st *GetConfigListInfo) WriteBlock(buf *codec.Buffer, tag byte) error

WriteBlock encode struct

func (*GetConfigListInfo) WriteTo

func (st *GetConfigListInfo) WriteTo(buf *codec.Buffer) (err error)

WriteTo encode struct to buffer

Jump to

Keyboard shortcuts

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