router

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

************************************************** Copyright 2016 https://github.com/AsynkronIT/protoactor-go

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ****************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBroadcastGroup

func NewBroadcastGroup(routees ...*actor.PID) *actor.Props

func NewBroadcastPool

func NewBroadcastPool(size int) *actor.Props

func NewConsistentHashGroup

func NewConsistentHashGroup(routees ...*actor.PID) *actor.Props

func NewConsistentHashPool

func NewConsistentHashPool(size int) *actor.Props

func NewRandomGroup

func NewRandomGroup(routees ...*actor.PID) *actor.Props

func NewRandomPool

func NewRandomPool(size int) *actor.Props

func NewRoundRobinGroup

func NewRoundRobinGroup(routees ...*actor.PID) *actor.Props

func NewRoundRobinPool

func NewRoundRobinPool(size int) *actor.Props

Types

type AddRoutee

type AddRoutee struct {
	PID *actor.PID
}

func (*AddRoutee) ManagementMessage

func (*AddRoutee) ManagementMessage()

type AdjustPoolSize

type AdjustPoolSize struct {
	Change int32
}

func (*AdjustPoolSize) ManagementMessage

func (*AdjustPoolSize) ManagementMessage()

type BroadcastMessage

type BroadcastMessage struct {
	Message interface{}
}

func (*BroadcastMessage) ManagementMessage

func (*BroadcastMessage) ManagementMessage()

type GetRoutees

type GetRoutees struct {
}

func (*GetRoutees) ManagementMessage

func (*GetRoutees) ManagementMessage()

type GroupRouter

type GroupRouter struct {
	Routees *actor.PIDSet
}

func (*GroupRouter) OnStarted

func (config *GroupRouter) OnStarted(context actor.Context, props *actor.Props, router Interface)

func (*GroupRouter) RouterType

func (config *GroupRouter) RouterType() RouterType

type Hasher

type Hasher interface {
	Hash() string
}

type Interface

type Interface interface {
	RouteMessage(message interface{})
	SetRoutees(routees *actor.PIDSet)
	GetRoutees() *actor.PIDSet
}

A type that satisfies router.Interface can be used as a router

type ManagementMessage

type ManagementMessage interface {
	ManagementMessage()
}

type PoolRouter

type PoolRouter struct {
	PoolSize int
}

func (*PoolRouter) OnStarted

func (config *PoolRouter) OnStarted(context actor.Context, props *actor.Props, router Interface)

func (*PoolRouter) RouterType

func (config *PoolRouter) RouterType() RouterType

type RemoveRoutee

type RemoveRoutee struct {
	PID *actor.PID
}

func (*RemoveRoutee) ManagementMessage

func (*RemoveRoutee) ManagementMessage()

type Routees

type Routees struct {
	PIDs []*actor.PID
}

type RouterConfig

type RouterConfig interface {
	RouterType() RouterType
	OnStarted(context actor.Context, props *actor.Props, router Interface)
	CreateRouterState() Interface
}

type RouterType

type RouterType int
const (
	GroupRouterType RouterType = iota
	PoolRouterType
)

Jump to

Keyboard shortcuts

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