service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SERVICE_REQUEST_ALL_FLAGS = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpService

type HttpService struct {
	HttpServiceConfiguration *HttpServiceConfiguration
}

func (*HttpService) Serve

func (h *HttpService) Serve(handlerFunc func(IServiceRequest) IServiceResponse) error

type HttpServiceConfiguration

type HttpServiceConfiguration struct {
	Port int32
}

type HttpServiceRequest

type HttpServiceRequest struct {
	Payload string
}

func (*HttpServiceRequest) GenerateServiceResponse

func (h *HttpServiceRequest) GenerateServiceResponse(body string) IServiceResponse

func (*HttpServiceRequest) GetRequestType

func (h *HttpServiceRequest) GetRequestType() SERVICE_REQUEST_TYPE

type HttpServiceResponse

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

func (*HttpServiceResponse) GetPayload

func (h *HttpServiceResponse) GetPayload() string

type IService

type IService interface {
	Serve(handlerFunc func(IServiceRequest) IServiceResponse) error
}

type IServiceConfiguration

type IServiceConfiguration interface {
}

type IServiceRequest

type IServiceRequest interface {
	GetRequestType() SERVICE_REQUEST_TYPE
	GenerateServiceResponse(body string) IServiceResponse
}

type IServiceResponse

type IServiceResponse interface {
	GetPayload() string
}

type SERVICE_REQUEST_TYPE

type SERVICE_REQUEST_TYPE int32

type SocketService

type SocketService struct {
	SocketServiceConfiguration *SocketServiceConfiguration
}

func (*SocketService) Serve

func (h *SocketService) Serve(handlerFunc func(IServiceRequest) IServiceResponse) error

type SocketServiceConfiguration

type SocketServiceConfiguration struct {
	SocketPath string
}

type SocketServiceRequest

type SocketServiceRequest struct {
	Payload string
}

func (*SocketServiceRequest) GenerateServiceResponse

func (h *SocketServiceRequest) GenerateServiceResponse(body string) IServiceResponse

func (*SocketServiceRequest) GetRequestType

func (h *SocketServiceRequest) GetRequestType() SERVICE_REQUEST_TYPE

type SocketServiceResponse

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

func (*SocketServiceResponse) GetPayload

func (h *SocketServiceResponse) GetPayload() string

Jump to

Keyboard shortcuts

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