rk_gin

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 24 Imported by: 4

Documentation

Overview

Copyright (c) 2020 rookie-ninja

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGinEntries

func NewGinEntries(path string, factory *rk_query.EventFactory, logger *zap.Logger) map[string]*GinEntry

Types

type GinEntry

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

func NewGinEntry

func NewGinEntry(opts ...GinEntryOption) *GinEntry

func (*GinEntry) Bootstrap

func (entry *GinEntry) Bootstrap(event rk_query.Event)

func (*GinEntry) GetName

func (entry *GinEntry) GetName() string

func (*GinEntry) GetPort

func (entry *GinEntry) GetPort() uint64

func (*GinEntry) GetRouter

func (entry *GinEntry) GetRouter() *gin.Engine

func (*GinEntry) GetSWEntry

func (entry *GinEntry) GetSWEntry() *swEntry

func (*GinEntry) GetServer

func (entry *GinEntry) GetServer() *http.Server

func (*GinEntry) GetTlsEntry

func (entry *GinEntry) GetTlsEntry() *tlsEntry

func (*GinEntry) GetType added in v1.1.3

func (entry *GinEntry) GetType() string

func (*GinEntry) IsSWEnabled added in v1.1.3

func (entry *GinEntry) IsSWEnabled() bool

func (*GinEntry) IsTlsEnabled added in v1.1.3

func (entry *GinEntry) IsTlsEnabled() bool

func (*GinEntry) Shutdown

func (entry *GinEntry) Shutdown(event rk_query.Event)

func (*GinEntry) String added in v1.1.3

func (entry *GinEntry) String() string

func (*GinEntry) Wait added in v1.1.3

func (entry *GinEntry) Wait(draining time.Duration)

type GinEntryOption

type GinEntryOption func(*GinEntry)

func WithEnableCommonService added in v1.1.1

func WithEnableCommonService(enable bool) GinEntryOption

func WithEventFactory

func WithEventFactory(factory *rk_query.EventFactory) GinEntryOption

func WithInterceptors

func WithInterceptors(inters ...gin.HandlerFunc) GinEntryOption

func WithLogger

func WithLogger(logger *zap.Logger) GinEntryOption

func WithName

func WithName(name string) GinEntryOption

func WithPort

func WithPort(port uint64) GinEntryOption

func WithRouter

func WithRouter(router *gin.Engine) GinEntryOption

func WithSWEntry

func WithSWEntry(sw *swEntry) GinEntryOption

func WithTlsEntry

func WithTlsEntry(tls *tlsEntry) GinEntryOption

Jump to

Keyboard shortcuts

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