services

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Namespace

func Namespace(session bus.Session, endpoints []string) (bus.Namespace, error)

Namespace returns a Namespace which connects to a remote service directory.

func NewServer

func NewServer(sess bus.Session, addr string, auth bus.Authenticator) (bus.Server, error)

NewServer starts a new server which listen to addr and serve incomming requests. It uses the given session to register and activate the new services.

Types

type ALAnimatedSpeechProxy

type ALAnimatedSpeechProxy interface {
	Say(text string) error
	IsBodyTalkEnabled() (bool, error)
	IsBodyLanguageEnabled() (bool, error)
	SetBodyTalkEnabled(enable bool) error
	SetBodyLanguageEnabled(enable bool) error
	// Generic methods shared by all objectsProxy
	bus.ObjectProxy
	// WithContext can be used cancellation and timeout
	WithContext(ctx context.Context) ALAnimatedSpeechProxy
}

ALAnimatedSpeechProxy represents a proxy object to the service

func ALAnimatedSpeech

func ALAnimatedSpeech(session bus.Session) (ALAnimatedSpeechProxy, error)

ALAnimatedSpeech returns a proxy to a remote service

func MakeALAnimatedSpeech

func MakeALAnimatedSpeech(sess bus.Session, proxy bus.Proxy) ALAnimatedSpeechProxy

MakeALAnimatedSpeech returns a specialized proxy.

type ALTextToSpeechProxy

type ALTextToSpeechProxy interface {
	Say(stringToSay string) error
	// Generic methods shared by all objectsProxy
	bus.ObjectProxy
	// WithContext can be used cancellation and timeout
	WithContext(ctx context.Context) ALTextToSpeechProxy
}

ALTextToSpeechProxy represents a proxy object to the service

func ALTextToSpeech

func ALTextToSpeech(session bus.Session) (ALTextToSpeechProxy, error)

ALTextToSpeech returns a proxy to a remote service

func MakeALTextToSpeech

func MakeALTextToSpeech(sess bus.Session, proxy bus.Proxy) ALTextToSpeechProxy

MakeALTextToSpeech returns a specialized proxy.

type LogLevel

type LogLevel struct {
	Level int32
}

LogLevel is serializable

var (
	LogLevelNone    LogLevel = LogLevel{Level: 0}
	LogLevelFatal   LogLevel = LogLevel{Level: 1}
	LogLevelError   LogLevel = LogLevel{Level: 2}
	LogLevelWarning LogLevel = LogLevel{Level: 3}
	LogLevelInfo    LogLevel = LogLevel{Level: 4}
	LogLevelVerbose LogLevel = LogLevel{Level: 5}
	LogLevelDebug   LogLevel = LogLevel{Level: 6}
)

type LogListenerProxy

type LogListenerProxy interface {
	SetCategory(category string, level LogLevel) error
	ClearFilters() error
	SubscribeOnLogMessage() (unsubscribe func(), updates chan LogMessage, err error)
	GetVerbosity() (LogLevel, error)
	SetVerbosity(LogLevel) error
	SubscribeVerbosity() (unsubscribe func(), updates chan LogLevel, err error)
	GetFilters() (map[string]int32, error)
	SetFilters(map[string]int32) error
	SubscribeFilters() (unsubscribe func(), updates chan map[string]int32, err error)
	// Generic methods shared by all objectsProxy
	bus.ObjectProxy
	// WithContext can be used cancellation and timeout
	WithContext(ctx context.Context) LogListenerProxy
}

LogListenerProxy represents a proxy object to the service

func LogListener

func LogListener(session bus.Session) (LogListenerProxy, error)

LogListener returns a proxy to a remote service

func MakeLogListener

func MakeLogListener(sess bus.Session, proxy bus.Proxy) LogListenerProxy

MakeLogListener returns a specialized proxy.

type LogManagerProxy

type LogManagerProxy interface {
	Log(messages []LogMessage) error
	CreateListener() (LogListenerProxy, error)
	GetListener() (LogListenerProxy, error)
	AddProvider(source LogProviderProxy) (int32, error)
	RemoveProvider(providerID int32) error
	// Generic methods shared by all objectsProxy
	bus.ObjectProxy
	// WithContext can be used cancellation and timeout
	WithContext(ctx context.Context) LogManagerProxy
}

LogManagerProxy represents a proxy object to the service

func LogManager

func LogManager(session bus.Session) (LogManagerProxy, error)

LogManager returns a proxy to a remote service

func MakeLogManager

func MakeLogManager(sess bus.Session, proxy bus.Proxy) LogManagerProxy

MakeLogManager returns a specialized proxy.

type LogMessage

type LogMessage struct {
	Source     string
	Level      LogLevel
	Category   string
	Location   string
	Message    string
	Id         uint32
	Date       TimePoint
	SystemDate TimePoint
}

LogMessage is serializable

type LogProviderProxy

type LogProviderProxy interface {
	SetVerbosity(level LogLevel) error
	SetCategory(category string, level LogLevel) error
	ClearAndSet(filters map[string]int32) error
	// Generic methods shared by all objectsProxy
	bus.ObjectProxy
	// WithContext can be used cancellation and timeout
	WithContext(ctx context.Context) LogProviderProxy
}

LogProviderProxy represents a proxy object to the service

func LogProvider

func LogProvider(session bus.Session) (LogProviderProxy, error)

LogProvider returns a proxy to a remote service

func MakeLogProvider

func MakeLogProvider(sess bus.Session, proxy bus.Proxy) LogProviderProxy

MakeLogProvider returns a specialized proxy.

type ServiceAdded

type ServiceAdded struct {
	ServiceID uint32
	Name      string
}

ServiceAdded is serializable

type ServiceDirectoryProxy

type ServiceDirectoryProxy interface {
	Service(name string) (ServiceInfo, error)
	Services() ([]ServiceInfo, error)
	RegisterService(info ServiceInfo) (uint32, error)
	UnregisterService(serviceID uint32) error
	ServiceReady(serviceID uint32) error
	UpdateServiceInfo(info ServiceInfo) error
	MachineId() (string, error)

	SubscribeServiceAdded() (unsubscribe func(), updates chan ServiceAdded, err error)
	SubscribeServiceRemoved() (unsubscribe func(), updates chan ServiceRemoved, err error)
	// Generic methods shared by all objectsProxy
	bus.ObjectProxy
	// WithContext can be used cancellation and timeout
	WithContext(ctx context.Context) ServiceDirectoryProxy
	// contains filtered or unexported methods
}

ServiceDirectoryProxy represents a proxy object to the service

func MakeServiceDirectory

func MakeServiceDirectory(sess bus.Session, proxy bus.Proxy) ServiceDirectoryProxy

MakeServiceDirectory returns a specialized proxy.

func ServiceDirectory

func ServiceDirectory(session bus.Session) (ServiceDirectoryProxy, error)

ServiceDirectory returns a proxy to a remote service

type ServiceInfo

type ServiceInfo struct {
	Name      string
	ServiceId uint32
	MachineId string
	ProcessId uint32
	Endpoints []string
	SessionId string
	ObjectUid string
}

ServiceInfo is serializable

func (ServiceInfo) Proxy

func (info ServiceInfo) Proxy(sess bus.Session) (bus.ObjectProxy, error)

Proxy returns a proxy to the service described by info.

type ServiceRemoved

type ServiceRemoved struct {
	ServiceID uint32
	Name      string
}

ServiceRemoved is serializable

type TimePoint

type TimePoint struct {
	Ns uint64
}

TimePoint is serializable

func Now

func Now() TimePoint

Jump to

Keyboard shortcuts

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