Files
ziti/pb/ctrl_pb/impl.go
T
Cam Otts 1a6fb53271 Router controller updates (#537)
* progress on controller communication

* added yaml encoding/decoding

* move dispatch callbacks to be more consistent

* update unit tests

* small cleaups

* Add new datadir to unit tests

* fix linter

* Was able to use FSM hooks to get configuration updates to show raft state

* Send index to prevent older versions from being applied and added leader override

* pr comments and added/removed ctrl connections

* added error logging

* pr comments

* spelling and bad log newlines

* added delete from the toconnect map and added end case to the background connect

* reordered removal from map

* added mtx around access. Forgot that was changed to be unsopported.
2023-01-18 09:19:13 -06:00

98 lines
2.6 KiB
Go

/*
Copyright NetFoundry Inc.
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
https://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.
*/
package ctrl_pb
import "github.com/openziti/fabric/controller/xt"
func (request *CircuitConfirmation) GetContentType() int32 {
return int32(ContentType_CircuitConfirmationType)
}
func (request *LinkConnected) GetContentType() int32 {
return int32(ContentType_LinkConnectedType)
}
func (request *RouterLinks) GetContentType() int32 {
return int32(ContentType_RouterLinksType)
}
func (request *VerifyLink) GetContentType() int32 {
return int32(ContentType_VerifyLinkType)
}
func (request *VerifyRouter) GetContentType() int32 {
return int32(ContentType_VerifyRouterType)
}
func (request *Fault) GetContentType() int32 {
return int32(ContentType_FaultType)
}
func (request *Route) GetContentType() int32 {
return int32(ContentType_RouteType)
}
func (request *Unroute) GetContentType() int32 {
return int32(ContentType_UnrouteType)
}
func (request *ValidateTerminatorsRequest) GetContentType() int32 {
return int32(ContentType_ValidateTerminatorsRequestType)
}
func (request *Dial) GetContentType() int32 {
return int32(ContentType_DialType)
}
func (request *CircuitRequest) GetContentType() int32 {
return int32(ContentType_CircuitRequestType)
}
func (request *RemoveTerminatorRequest) GetContentType() int32 {
return int32(ContentType_RemoveTerminatorRequestType)
}
func (request *InspectRequest) GetContentType() int32 {
return int32(ContentType_InspectRequestType)
}
func (response *InspectResponse) GetContentType() int32 {
return int32(ContentType_InspectResponseType)
}
func (response *InspectResponse) AddValue(name, value string) {
newValue := &InspectResponse_InspectValue{
Name: name,
Value: value,
}
response.Values = append(response.Values, newValue)
}
func (request *CreateTerminatorRequest) GetXtPrecedence() xt.Precedence {
if request.GetPrecedence() == TerminatorPrecedence_Failed {
return xt.Precedences.Failed
}
if request.GetPrecedence() == TerminatorPrecedence_Required {
return xt.Precedences.Required
}
return xt.Precedences.Default
}
func (request *UpdateCtrlAddresses) GetContentType() int32 {
return int32(ContentType_UpdateCtrlAddressesType)
}