admin

package
v1.4.46 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Code generated by ksf2go 1.3.28, DO NOT EDIT. This file was generated from AdminF.ksf Package admin comment

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminF

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

AdminF struct

func NewAdminF

func NewAdminF() *AdminF

NewAdminF creates a new AdminF servant.

func (*AdminF) AddServant

func (obj *AdminF) AddServant(imp AdminFServant, servant string)

AddServant adds servant for the service.

func (*AdminF) AddServantWithContext

func (obj *AdminF) AddServantWithContext(imp AdminFServantWithContext, servant string)

AddServantWithContext adds servant for the service with context.

func (*AdminF) AllEndpoints

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

Endpoints returns all endpoint.Endpoint

func (*AdminF) Dispatch

func (obj *AdminF) 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 (*AdminF) Endpoints

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

Endpoints returns all active endpoint.Endpoint

func (*AdminF) GetServant

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

GetServant gets servant for the service.

func (*AdminF) KsfPing

func (obj *AdminF) KsfPing() error

KsfPing

func (*AdminF) KsfPingWithContext

func (obj *AdminF) KsfPingWithContext(ksfCtx context.Context) error

KsfPingWithContext

func (*AdminF) KsfSetProtocol

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

KsfSetProtocol sets the protocol for the servant.

func (*AdminF) KsfSetTimeout

func (obj *AdminF) KsfSetTimeout(timeout int)

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

func (*AdminF) KsfSetVersion

func (obj *AdminF) KsfSetVersion(version int16)

KsfSetVersion default as KSFVERSION,you can set JSONVERSION.

func (*AdminF) Notify

func (obj *AdminF) Notify(command string, opts ...map[string]string) (string, error)

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

func (*AdminF) NotifyOneWayWithContext

func (obj *AdminF) NotifyOneWayWithContext(ksfCtx context.Context, command string, opts ...map[string]string) (ret string, err error)

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

func (*AdminF) NotifyWithContext

func (obj *AdminF) NotifyWithContext(ksfCtx context.Context, command string, opts ...map[string]string) (ret string, err error)

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

func (*AdminF) SetOnCloseCallback

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

SetOnCloseCallback

func (*AdminF) SetOnConnectCallback

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

SetOnConnectCallback

func (*AdminF) SetPushCallback

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

SetPushCallback

func (*AdminF) SetServant

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

SetServant sets servant for the service.

func (*AdminF) Shutdown

func (obj *AdminF) Shutdown(opts ...map[string]string) error

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

func (*AdminF) ShutdownOneWayWithContext

func (obj *AdminF) ShutdownOneWayWithContext(ksfCtx context.Context, opts ...map[string]string) (err error)

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

func (*AdminF) ShutdownWithContext

func (obj *AdminF) ShutdownWithContext(ksfCtx context.Context, opts ...map[string]string) (err error)

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

type AdminFServant

type AdminFServant interface {
	Shutdown() (err error)
	Notify(command string) (ret string, err error)
}

type AdminFServantWithContext

type AdminFServantWithContext interface {
	Shutdown(ksfCtx context.Context) (err error)
	Notify(ksfCtx context.Context, command string) (ret string, err error)
	DoClose(ctx context.Context)
}

Jump to

Keyboard shortcuts

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