Documentation
¶
Overview ¶
Package openflow Common Logger initialization
Copyright 2020 the original author or authors. 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 2020 the original author or authors.
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 2020 the original author or authors. 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 ¶
var NoVolthaConnectionError = errors.New("no-voltha-connection")
Functions ¶
Types ¶
type Message ¶
Message interface that represents an open flow message and enables for a unified implementation of SendMessage
type OFClient ¶
type OFClient struct { OFControllerEndPoints []string DeviceID string VolthaClient *holder.VolthaServiceClientHolder PacketOutChannel chan *voltha.PacketOut ConnectionMaxRetries int ConnectionRetryDelay time.Duration // contains filtered or unexported fields }
OFClient the configuration and operational state of a connection to an openflow controller
func NewOFClient ¶
NewClient returns an initialized OFClient instance based on the configuration specified
func (*OFClient) SendMessage ¶
func (*OFClient) UpdateRoles ¶ added in v1.2.0
UpdateRoles validates a role request and updates role state for connections where it changed
type OFConnection ¶ added in v1.2.0
type OFConnection struct { OFControllerEndPoint string DeviceID string VolthaClient *holder.VolthaServiceClientHolder PacketOutChannel chan *voltha.PacketOut ConnectionMaxRetries int ConnectionRetryDelay time.Duration // contains filtered or unexported fields }
func (*OFConnection) Run ¶ added in v1.2.0
func (ofc *OFConnection) Run(ctx context.Context)
Run implements the state machine for the OF client reacting to state change events and invoking actions as a reaction to those state changes
func (*OFConnection) SendMessage ¶ added in v1.2.0
func (ofc *OFConnection) SendMessage(ctx context.Context, message Message) error
SendMessage queues a message to be sent to the openflow controller