server

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 2 Imported by: 0

README

Hyperscale Server Last release Documentation

Go Report Card

Branch Status Coverage
master Build Status Coveralls

The Hyperscale server library provides a simple server over Fiber.

Example

package main

import (
    "github.com/hyperscale-stack/server"
)

func main() {
    app := server.New()

    app.AddController(&myController{})

    app.Listen(":3000")
}

License

Hyperscale Server is licensed under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Mount(r *Router)
}

Controller interface

type MockController

type MockController struct {
	mock.Mock
}

MockController is an autogenerated mock type for the Controller type

func NewMockController

func NewMockController(t mockConstructorTestingTNewMockController) *MockController

NewMockController creates a new instance of MockController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockController) Mount

func (_m *MockController) Mount(r *Router)

Mount provides a mock function with given fields: r

type Router

type Router struct {
	*fiber.App
}

Router struct.

func New

func New(config ...fiber.Config) *Router

New constructor.

func (*Router) AddController

func (r *Router) AddController(controller Controller)

AddController to Router.

Jump to

Keyboard shortcuts

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